home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-09-28 | 27.3 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Sep 28 12:00:00 1999, modified Tue Sep 28 12:00:00 1999, creator 'MPS ', type ASCII, 27022 bytes "SampleSBP2Family.c" , at 0x6a0e 574 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 53 61 6d 70 6c 65 | 53 42 50 32 46 61 6d 69 |..Sample|SBP2Fami|
|00000010| 6c 79 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |ly.c....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 69 8e 00 | 00 02 3e b4 16 96 80 b4 |.....i..|..>.....|
|00000060| 16 96 80 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 72 1b 00 00 |........|....r...|
|00000080| 2f 2a 0d 09 46 69 6c 65 | 3a 09 09 53 61 6d 70 6c |/*..File|:..Sampl|
|00000090| 65 53 42 50 32 46 61 6d | 69 6c 79 2e 63 0d 0d 09 |eSBP2Fam|ily.c...|
|000000a0| 43 6f 6e 74 61 69 6e 73 | 3a 09 53 61 6d 70 6c 65 |Contains|:.Sample|
|000000b0| 20 66 61 6d 69 6c 79 20 | 66 6f 72 20 53 65 72 69 | family |for Seri|
|000000c0| 61 6c 20 42 75 73 20 50 | 72 6f 74 6f 63 6f 6c 20 |al Bus P|rotocol |
|000000d0| 32 20 28 53 42 50 2d 32 | 29 0d 0d 09 56 65 72 73 |2 (SBP-2|)...Vers|
|000000e0| 69 6f 6e 3a 09 31 2e 30 | 0d 0d 09 43 6f 70 79 72 |ion:.1.0|...Copyr|
|000000f0| 69 67 68 74 3a 09 a9 20 | 31 39 39 38 2d 31 39 39 |ight:.. |1998-199|
|00000100| 39 20 62 79 20 41 70 70 | 6c 65 20 43 6f 6d 70 75 |9 by App|le Compu|
|00000110| 74 65 72 2c 20 49 6e 63 | 2e 2c 20 61 6c 6c 20 72 |ter, Inc|., all r|
|00000120| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 0d |ights re|served..|
|00000130| 0d 09 46 69 6c 65 20 4f | 77 6e 65 72 73 68 69 70 |..File O|wnership|
|00000140| 3a 0d 0d 09 09 44 52 49 | 3a 09 09 09 09 45 72 69 |:....DRI|:....Eri|
|00000150| 63 20 41 6e 64 65 72 73 | 6f 6e 0d 0d 09 09 4f 74 |c Anders|on....Ot|
|00000160| 68 65 72 20 43 6f 6e 74 | 61 63 74 3a 09 09 0d 0d |her Cont|act:....|
|00000170| 09 09 54 65 63 68 6e 6f | 6c 6f 67 79 3a 09 09 09 |..Techno|logy:...|
|00000180| 46 69 72 65 57 69 72 65 | 0d 0d 09 57 72 69 74 65 |FireWire|...Write|
|00000190| 72 73 3a 0d 0d 09 09 28 | 45 41 29 09 45 72 69 63 |rs:....(|EA).Eric|
|000001a0| 20 41 6e 64 65 72 73 6f | 6e 20 28 65 77 61 29 0d | Anderso|n (ewa).|
|000001b0| 09 09 28 44 43 42 29 09 | 43 6c 69 6e 74 6f 6e 20 |..(DCB).|Clinton |
|000001c0| 42 61 75 64 65 72 0d 0d | 09 43 68 61 6e 67 65 20 |Bauder..|.Change |
|000001d0| 48 69 73 74 6f 72 79 20 | 28 6d 6f 73 74 20 72 65 |History |(most re|
|000001e0| 63 65 6e 74 20 66 69 72 | 73 74 29 3a 0d 0d 09 20 |cent fir|st):... |
|000001f0| 20 20 3c 46 57 35 3e 09 | 20 36 2f 32 38 2f 39 39 | <FW5>.| 6/28/99|
|00000200| 09 45 41 09 09 43 68 61 | 6e 67 65 64 20 49 6e 73 |.EA..Cha|nged Ins|
|00000210| 74 61 6c 6c 53 42 50 45 | 78 70 65 72 74 20 74 6f |tallSBPE|xpert to|
|00000220| 20 75 73 65 20 63 6f 72 | 72 65 63 74 20 61 72 72 | use cor|rect arr|
|00000230| 61 79 20 73 69 7a 65 20 | 66 6f 72 0d 09 09 09 09 |ay size |for.....|
|00000240| 09 09 09 09 09 65 76 65 | 6e 74 54 61 62 6c 65 2e |.....eve|ntTable.|
|00000250| 0d 09 20 20 20 3c 46 57 | 34 3e 09 20 34 2f 31 37 |.. <FW|4>. 4/17|
|00000260| 2f 39 39 09 44 43 42 09 | 09 43 6c 65 61 6e 20 75 |/99.DCB.|.Clean u|
|00000270| 70 20 73 6f 6d 65 20 6e | 61 6d 65 2d 73 70 61 63 |p some n|ame-spac|
|00000280| 65 20 70 72 6f 62 6c 65 | 6d 73 20 77 68 65 72 65 |e proble|ms where|
|00000290| 20 76 61 72 69 61 62 6c | 65 73 20 68 61 64 20 74 | variabl|es had t|
|000002a0| 68 65 20 73 61 6d 65 0d | 09 09 09 09 09 09 09 09 |he same.|........|
|000002b0| 09 6e 61 6d 65 20 61 73 | 20 74 68 65 69 72 20 74 |.name as| their t|
|000002c0| 79 70 65 2e 20 53 6f 6d | 65 20 63 6f 6d 70 69 6c |ype. Som|e compil|
|000002d0| 65 72 73 20 64 6f 6e 27 | 74 20 6c 69 6b 65 20 74 |ers don'|t like t|
|000002e0| 68 69 73 2e 0d 09 20 20 | 20 3c 46 57 33 3e 09 20 |his... | <FW3>. |
|000002f0| 31 2f 31 35 2f 39 39 09 | 45 41 09 09 46 69 78 20 |1/15/99.|EA..Fix |
|00000300| 75 6e 69 6e 69 74 69 61 | 6c 69 7a 65 64 20 76 61 |uninitia|lized va|
|00000310| 72 69 61 62 6c 65 20 70 | 72 6f 62 6c 65 6d 2e 0d |riable p|roblem..|
|00000320| 09 20 20 20 3c 46 57 32 | 3e 09 20 39 2f 32 30 2f |. <FW2|>. 9/20/|
|00000330| 39 38 09 45 41 09 09 46 | 69 6c 6c 65 64 20 69 6e |98.EA..F|illed in|
|00000340| 20 68 65 61 64 65 72 20 | 63 6f 6d 6d 65 6e 74 73 | header |comments|
|00000350| 2e 0d 09 20 20 20 3c 46 | 57 31 3e 09 20 39 2f 32 |... <F|W1>. 9/2|
|00000360| 30 2f 39 38 09 45 41 09 | 09 66 69 72 73 74 20 63 |0/98.EA.|.first c|
|00000370| 68 65 63 6b 65 64 20 69 | 6e 0d 2a 2f 0d 0d 0d 23 |hecked i|n.*/...#|
|00000380| 69 6e 63 6c 75 64 65 20 | 3c 54 79 70 65 73 2e 68 |include |<Types.h|
|00000390| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 45 72 72 6f |>.#inclu|de <Erro|
|000003a0| 72 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |rs.h>.#i|nclude <|
|000003b0| 53 74 72 69 6e 67 73 2e | 68 3e 0d 23 69 6e 63 6c |Strings.|h>.#incl|
|000003c0| 75 64 65 20 3c 54 72 61 | 70 73 2e 68 3e 0d 23 69 |ude <Tra|ps.h>.#i|
|000003d0| 6e 63 6c 75 64 65 20 3c | 45 76 65 6e 74 73 2e 68 |nclude <|Events.h|
|000003e0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 50 72 6f 63 |>.#inclu|de <Proc|
|000003f0| 65 73 73 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |esses.h>|.#includ|
|00000400| 65 20 3c 41 70 70 6c 65 | 45 76 65 6e 74 73 2e 68 |e <Apple|Events.h|
|00000410| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 44 65 76 69 |>.#inclu|de <Devi|
|00000420| 63 65 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ces.h>.#|include |
|00000430| 3c 43 6f 64 65 46 72 61 | 67 6d 65 6e 74 73 2e 68 |<CodeFra|gments.h|
|00000440| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 44 72 69 76 |>.#inclu|de <Driv|
|00000450| 65 72 53 65 72 76 69 63 | 65 73 2e 68 3e 0d 23 69 |erServic|es.h>.#i|
|00000460| 6e 63 6c 75 64 65 20 3c | 4e 61 6d 65 52 65 67 69 |nclude <|NameRegi|
|00000470| 73 74 72 79 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |stry.h>.|#include|
|00000480| 20 3c 47 65 6e 65 72 69 | 63 44 72 69 76 65 72 46 | <Generi|cDriverF|
|00000490| 61 6d 69 6c 79 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |amily.h>|.#includ|
|000004a0| 65 20 3c 53 61 6d 70 6c | 65 53 42 50 32 2e 68 3e |e <Sampl|eSBP2.h>|
|000004b0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 61 6d 70 6c |.#includ|e <Sampl|
|000004c0| 65 53 42 50 32 50 72 69 | 76 2e 68 3e 0d 23 69 6e |eSBP2Pri|v.h>.#in|
|000004d0| 63 6c 75 64 65 20 3c 53 | 61 6d 70 6c 65 53 42 50 |clude <S|ampleSBP|
|000004e0| 32 45 78 70 65 72 74 2e | 68 3e 0d 0d 2f 2f 2f 2f |2Expert.|h>..////|
|000004f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000500| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000510| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000520| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000530| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 0d 2f 2f 0d |////////|////.//.|
|00000540| 2f 2f 20 44 65 66 69 6e | 65 20 67 6c 6f 62 61 6c |// Defin|e global|
|00000550| 20 73 74 72 75 63 74 75 | 72 65 20 74 6f 20 68 6f | structu|re to ho|
|00000560| 6c 64 20 61 6c 6c 20 6f | 66 20 74 68 65 20 53 61 |ld all o|f the Sa|
|00000570| 6d 70 6c 65 20 53 42 50 | 0d 2f 2f 20 46 61 6d 69 |mple SBP|.// Fami|
|00000580| 6c 79 20 64 61 74 61 2e | 0d 2f 2f 0d 0d 53 42 50 |ly data.|.//..SBP|
|00000590| 46 61 6d 69 6c 79 44 61 | 74 61 50 74 72 09 09 09 |FamilyDa|taPtr...|
|000005a0| 09 67 70 53 42 50 46 61 | 6d 69 6c 79 44 61 74 61 |.gpSBPFa|milyData|
|000005b0| 20 3d 20 6e 69 6c 3b 0d | 53 42 50 45 78 70 65 72 | = nil;.|SBPExper|
|000005c0| 74 44 61 74 61 50 74 72 | 09 09 09 09 67 70 53 42 |tDataPtr|....gpSB|
|000005d0| 50 45 78 70 65 72 74 44 | 61 74 61 20 3d 20 6e 69 |PExpertD|ata = ni|
|000005e0| 6c 3b 0d 0d 0d 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |l;...///|////////|
|000005f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000600| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000610| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000620| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000630| 2f 2f 2f 2f 2f 0d 2f 2f | 0d 2f 2f 20 49 6e 74 65 |/////.//|.// Inte|
|00000640| 72 6e 61 6c 20 72 6f 75 | 74 69 6e 65 20 70 72 6f |rnal rou|tine pro|
|00000650| 74 6f 74 79 70 65 73 2e | 0d 2f 2f 0d 0d 73 74 61 |totypes.|.//..sta|
|00000660| 74 69 63 20 4f 53 53 74 | 61 74 75 73 09 53 42 50 |tic OSSt|atus.SBP|
|00000670| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 20 28 0d 09 |EventHan|dler (..|
|00000680| 47 44 46 44 65 76 69 63 | 65 45 76 65 6e 74 44 61 |GDFDevic|eEventDa|
|00000690| 74 61 50 74 72 09 09 70 | 47 44 46 44 65 76 69 63 |taPtr..p|GDFDevic|
|000006a0| 65 45 76 65 6e 74 44 61 | 74 61 29 3b 0d 0d 73 74 |eEventDa|ta);..st|
|000006b0| 61 74 69 63 20 4f 53 53 | 74 61 74 75 73 09 53 42 |atic OSS|tatus.SB|
|000006c0| 50 48 61 6e 64 6c 65 44 | 65 76 69 63 65 41 64 64 |PHandleD|eviceAdd|
|000006d0| 65 64 20 28 0d 09 47 44 | 46 44 65 76 69 63 65 45 |ed (..GD|FDeviceE|
|000006e0| 76 65 6e 74 44 61 74 61 | 50 74 72 09 09 70 47 44 |ventData|Ptr..pGD|
|000006f0| 46 44 65 76 69 63 65 45 | 76 65 6e 74 44 61 74 61 |FDeviceE|ventData|
|00000700| 29 3b 0d 0d 73 74 61 74 | 69 63 20 4f 53 53 74 61 |);..stat|ic OSSta|
|00000710| 74 75 73 09 53 42 50 48 | 61 6e 64 6c 65 44 65 76 |tus.SBPH|andleDev|
|00000720| 69 63 65 52 65 6d 6f 76 | 65 64 20 28 0d 09 47 44 |iceRemov|ed (..GD|
|00000730| 46 44 65 76 69 63 65 45 | 76 65 6e 74 44 61 74 61 |FDeviceE|ventData|
|00000740| 50 74 72 09 09 70 47 44 | 46 44 65 76 69 63 65 45 |Ptr..pGD|FDeviceE|
|00000750| 76 65 6e 74 44 61 74 61 | 29 3b 0d 0d 73 74 61 74 |ventData|);..stat|
|00000760| 69 63 20 4f 53 45 72 72 | 09 53 42 50 53 65 6e 64 |ic OSErr|.SBPSend|
|00000770| 43 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |ClientAp|pleEvent|
|00000780| 20 28 0d 09 53 42 50 43 | 6c 69 65 6e 74 44 61 74 | (..SBPC|lientDat|
|00000790| 61 50 74 72 09 09 09 70 | 53 42 50 43 6c 69 65 6e |aPtr...p|SBPClien|
|000007a0| 74 44 61 74 61 2c 0d 09 | 63 6f 6e 73 74 20 41 70 |tData,..|const Ap|
|000007b0| 70 6c 65 45 76 65 6e 74 | 09 09 09 2a 74 68 65 41 |pleEvent|...*theA|
|000007c0| 70 70 6c 65 45 76 65 6e | 74 2c 0d 09 41 45 53 65 |ppleEven|t,..AESe|
|000007d0| 6e 64 4d 6f 64 65 09 09 | 09 09 09 73 65 6e 64 4d |ndMode..|...sendM|
|000007e0| 6f 64 65 2c 0d 09 41 45 | 53 65 6e 64 50 72 69 6f |ode,..AE|SendPrio|
|000007f0| 72 69 74 79 09 09 09 09 | 73 65 6e 64 50 72 69 6f |rity....|sendPrio|
|00000800| 72 69 74 79 2c 0d 09 6c | 6f 6e 67 09 09 09 09 09 |rity,..l|ong.....|
|00000810| 09 74 69 6d 65 4f 75 74 | 49 6e 54 69 63 6b 73 2c |.timeOut|InTicks,|
|00000820| 0d 09 41 45 49 64 6c 65 | 55 50 50 09 09 09 09 09 |..AEIdle|UPP.....|
|00000830| 69 64 6c 65 50 72 6f 63 | 2c 0d 09 41 45 46 69 6c |idleProc|,..AEFil|
|00000840| 74 65 72 55 50 50 09 09 | 09 09 09 66 69 6c 74 65 |terUPP..|...filte|
|00000850| 72 50 72 6f 63 29 3b 0d | 0d 73 74 61 74 69 63 20 |rProc);.|.static |
|00000860| 76 6f 69 64 09 44 69 73 | 70 6f 73 65 43 6c 69 65 |void.Dis|poseClie|
|00000870| 6e 74 41 70 70 6c 65 45 | 76 65 6e 74 44 61 74 61 |ntAppleE|ventData|
|00000880| 20 28 0d 09 43 6c 69 65 | 6e 74 41 70 70 6c 65 45 | (..Clie|ntAppleE|
|00000890| 76 65 6e 74 44 61 74 61 | 50 74 72 09 09 70 43 6c |ventData|Ptr..pCl|
|000008a0| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 44 61 |ientAppl|eEventDa|
|000008b0| 74 61 29 3b 0d 0d 73 74 | 61 74 69 63 20 4f 53 53 |ta);..st|atic OSS|
|000008c0| 74 61 74 75 73 09 53 42 | 50 43 72 65 61 74 65 43 |tatus.SB|PCreateC|
|000008d0| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 51 |lientApp|leEventQ|
|000008e0| 75 65 75 65 20 28 0d 09 | 53 42 50 43 6c 69 65 6e |ueue (..|SBPClien|
|000008f0| 74 44 61 74 61 50 74 72 | 09 09 09 70 53 42 50 43 |tDataPtr|...pSBPC|
|00000900| 6c 69 65 6e 74 44 61 74 | 61 29 3b 0d 0d 73 74 61 |lientDat|a);..sta|
|00000910| 74 69 63 20 4f 53 53 74 | 61 74 75 73 09 53 42 50 |tic OSSt|atus.SBP|
|00000920| 44 69 73 70 6f 73 65 43 | 6c 69 65 6e 74 41 70 70 |DisposeC|lientApp|
|00000930| 6c 65 45 76 65 6e 74 51 | 75 65 75 65 20 28 0d 09 |leEventQ|ueue (..|
|00000940| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 50 74 72 |SBPClien|tDataPtr|
|00000950| 09 09 09 70 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |...pSBPC|lientDat|
|00000960| 61 29 3b 0d 0d 73 74 61 | 74 69 63 20 4f 53 53 74 |a);..sta|tic OSSt|
|00000970| 61 74 75 73 09 53 42 50 | 41 64 64 44 72 69 76 65 |atus.SBP|AddDrive|
|00000980| 72 20 28 0d 09 47 44 46 | 44 65 76 69 63 65 45 76 |r (..GDF|DeviceEv|
|00000990| 65 6e 74 44 61 74 61 50 | 74 72 09 09 70 47 44 46 |entDataP|tr..pGDF|
|000009a0| 44 65 76 69 63 65 45 76 | 65 6e 74 44 61 74 61 2c |DeviceEv|entData,|
|000009b0| 0d 09 53 42 50 44 72 69 | 76 65 72 49 44 09 09 09 |..SBPDri|verID...|
|000009c0| 09 09 2a 70 53 42 50 44 | 72 69 76 65 72 49 44 29 |..*pSBPD|riverID)|
|000009d0| 3b 0d 0d 73 74 61 74 69 | 63 20 4f 53 53 74 61 74 |;..stati|c OSStat|
|000009e0| 75 73 09 43 72 65 61 74 | 65 53 42 50 44 72 69 76 |us.Creat|eSBPDriv|
|000009f0| 65 72 49 44 20 28 0d 09 | 53 42 50 44 72 69 76 65 |erID (..|SBPDrive|
|00000a00| 72 49 44 09 09 09 09 09 | 2a 70 53 42 50 44 72 69 |rID.....|*pSBPDri|
|00000a10| 76 65 72 49 44 29 3b 0d | 0d 73 74 61 74 69 63 20 |verID);.|.static |
|00000a20| 76 6f 69 64 09 44 69 73 | 70 6f 73 65 53 42 50 44 |void.Dis|poseSBPD|
|00000a30| 72 69 76 65 72 20 28 0d | 09 53 42 50 44 72 69 76 |river (.|.SBPDriv|
|00000a40| 65 72 49 44 09 09 09 09 | 09 73 62 70 44 72 69 76 |erID....|.sbpDriv|
|00000a50| 65 72 49 44 29 3b 0d 0d | 73 74 61 74 69 63 20 53 |erID);..|static S|
|00000a60| 42 50 44 72 69 76 65 72 | 49 44 09 53 42 50 46 69 |BPDriver|ID.SBPFi|
|00000a70| 6e 64 44 72 69 76 65 72 | 20 28 0d 09 52 65 67 45 |ndDriver| (..RegE|
|00000a80| 6e 74 72 79 49 44 50 74 | 72 09 09 09 09 70 52 65 |ntryIDPt|r....pRe|
|00000a90| 67 45 6e 74 72 79 49 44 | 29 3b 0d 0d 0d 2f 2f 2f |gEntryID|);...///|
|00000aa0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000ab0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000ac0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000ad0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000ae0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 2f 2f |////////|/////.//|
|00000af0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 0d 2f |////////|//////./|
|00000b40| 2f 0d 2f 2f 20 50 75 62 | 6c 69 63 20 72 6f 75 74 |/.// Pub|lic rout|
|00000b50| 69 6e 65 73 2e 0d 2f 2f | 0d 2f 2f 2f 2f 2f 2f 2f |ines..//|.///////|
|00000b60| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b70| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b80| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000b90| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000ba0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 0d 2f 2f 2f 2f 2f 2f |////////|/.//////|
|00000bb0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000bc0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000bd0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000be0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000bf0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 0d 0d 2f 2f 2f 2f |////////|//..////|
|00000c00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000c10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000c20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000c30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000c40| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 0d 2f 2f 0d |////////|////.//.|
|00000c50| 2f 2f 20 52 65 67 69 73 | 74 65 72 53 42 50 43 6c |// Regis|terSBPCl|
|00000c60| 69 65 6e 74 41 70 70 6c | 69 63 61 74 69 6f 6e 0d |ientAppl|ication.|
|00000c70| 2f 2f 0d 2f 2f 20 20 20 | 54 68 69 73 20 72 6f 75 |//.// |This rou|
|00000c80| 74 69 6e 65 20 72 65 67 | 69 73 74 65 72 73 20 74 |tine reg|isters t|
|00000c90| 68 65 20 63 61 6c 6c 69 | 6e 67 20 61 70 70 6c 69 |he calli|ng appli|
|00000ca0| 63 61 74 69 6f 6e 20 61 | 73 20 61 20 63 6c 69 65 |cation a|s a clie|
|00000cb0| 6e 74 20 6f 66 20 74 68 | 65 0d 2f 2f 20 53 61 6d |nt of th|e.// Sam|
|00000cc0| 70 6c 65 20 53 42 50 20 | 66 61 6d 69 6c 79 2e 0d |ple SBP |family..|
|00000cd0| 2f 2f 0d 0d 4f 53 53 74 | 61 74 75 73 09 52 65 67 |//..OSSt|atus.Reg|
|00000ce0| 69 73 74 65 72 53 42 50 | 43 6c 69 65 6e 74 41 70 |isterSBP|ClientAp|
|00000cf0| 70 6c 69 63 61 74 69 6f | 6e 28 0d 09 53 42 50 43 |plicatio|n(..SBPC|
|00000d00| 6c 69 65 6e 74 49 44 09 | 09 09 09 09 2a 70 53 42 |lientID.|....*pSB|
|00000d10| 50 43 6c 69 65 6e 74 49 | 44 2c 0d 09 55 49 6e 74 |PClientI|D,..UInt|
|00000d20| 33 32 09 09 09 09 09 09 | 63 6c 69 65 6e 74 43 6f |32......|clientCo|
|00000d30| 6e 74 65 78 74 44 61 74 | 61 29 0d 7b 0d 09 53 42 |ntextDat|a).{..SB|
|00000d40| 50 43 6c 69 65 6e 74 49 | 44 09 09 09 09 09 73 62 |PClientI|D.....sb|
|00000d50| 70 43 6c 69 65 6e 74 49 | 44 20 3d 20 6b 49 6e 76 |pClientI|D = kInv|
|00000d60| 61 6c 69 64 53 42 50 43 | 6c 69 65 6e 74 49 44 3b |alidSBPC|lientID;|
|00000d70| 0d 09 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 50 |..SBPCli|entDataP|
|00000d80| 74 72 09 09 09 70 53 42 | 50 43 6c 69 65 6e 74 44 |tr...pSB|PClientD|
|00000d90| 61 74 61 20 3d 20 6e 69 | 6c 2c 0d 09 09 09 09 09 |ata = ni|l,......|
|00000da0| 09 09 09 70 4e 65 78 74 | 53 42 50 43 6c 69 65 6e |...pNext|SBPClien|
|00000db0| 74 44 61 74 61 3b 0d 09 | 50 72 6f 63 65 73 73 53 |tData;..|ProcessS|
|00000dc0| 65 72 69 61 6c 4e 75 6d | 62 65 72 09 09 09 63 75 |erialNum|ber...cu|
|00000dd0| 72 72 65 6e 74 50 53 4e | 3b 0d 09 4f 53 53 74 61 |rrentPSN|;..OSSta|
|00000de0| 74 75 73 09 09 09 09 09 | 73 74 61 74 75 73 20 3d |tus.....|status =|
|00000df0| 20 6e 6f 45 72 72 3b 0d | 0d 09 2f 2f 20 41 6c 6c | noErr;.|..// All|
|00000e00| 6f 63 61 74 65 20 63 6c | 69 65 6e 74 20 64 61 74 |ocate cl|ient dat|
|00000e10| 61 20 72 65 63 6f 72 64 | 2e 0d 09 70 53 42 50 43 |a record|...pSBPC|
|00000e20| 6c 69 65 6e 74 44 61 74 | 61 20 3d 0d 09 09 28 53 |lientDat|a =...(S|
|00000e30| 42 50 43 6c 69 65 6e 74 | 44 61 74 61 50 74 72 29 |BPClient|DataPtr)|
|00000e40| 20 50 6f 6f 6c 41 6c 6c | 6f 63 61 74 65 52 65 73 | PoolAll|ocateRes|
|00000e50| 69 64 65 6e 74 20 28 73 | 69 7a 65 6f 66 20 28 53 |ident (s|izeof (S|
|00000e60| 42 50 43 6c 69 65 6e 74 | 44 61 74 61 29 2c 20 74 |BPClient|Data), t|
|00000e70| 72 75 65 29 3b 0d 09 69 | 66 20 28 70 53 42 50 43 |rue);..i|f (pSBPC|
|00000e80| 6c 69 65 6e 74 44 61 74 | 61 20 21 3d 20 6e 69 6c |lientDat|a != nil|
|00000e90| 29 0d 09 7b 0d 09 09 70 | 53 42 50 43 6c 69 65 6e |)..{...p|SBPClien|
|00000ea0| 74 44 61 74 61 2d 3e 63 | 6c 69 65 6e 74 43 6f 6e |tData->c|lientCon|
|00000eb0| 74 65 78 74 44 61 74 61 | 20 3d 20 63 6c 69 65 6e |textData| = clien|
|00000ec0| 74 43 6f 6e 74 65 78 74 | 44 61 74 61 3b 0d 09 09 |tContext|Data;...|
|00000ed0| 73 62 70 43 6c 69 65 6e | 74 49 44 20 3d 20 28 53 |sbpClien|tID = (S|
|00000ee0| 42 50 43 6c 69 65 6e 74 | 49 44 29 20 70 53 42 50 |BPClient|ID) pSBP|
|00000ef0| 43 6c 69 65 6e 74 44 61 | 74 61 3b 0d 09 7d 0d 09 |ClientDa|ta;..}..|
|00000f00| 65 6c 73 65 0d 09 7b 0d | 09 09 73 74 61 74 75 73 |else..{.|..status|
|00000f10| 20 3d 20 6d 65 6d 46 75 | 6c 6c 45 72 72 3b 0d 09 | = memFu|llErr;..|
|00000f20| 7d 0d 0d 09 2f 2f 20 41 | 64 64 20 63 6c 69 65 6e |}...// A|dd clien|
|00000f30| 74 20 64 61 74 61 20 72 | 65 63 6f 72 64 20 74 6f |t data r|ecord to|
|00000f40| 20 6c 69 73 74 2e 0d 09 | 69 66 20 28 73 74 61 74 | list...|if (stat|
|00000f50| 75 73 20 3d 3d 20 6e 6f | 45 72 72 29 0d 09 7b 0d |us == no|Err)..{.|
|00000f60| 09 09 70 4e 65 78 74 53 | 42 50 43 6c 69 65 6e 74 |..pNextS|BPClient|
|00000f70| 44 61 74 61 20 3d 20 67 | 70 53 42 50 46 61 6d 69 |Data = g|pSBPFami|
|00000f80| 6c 79 44 61 74 61 2d 3e | 70 53 42 50 43 6c 69 65 |lyData->|pSBPClie|
|00000f90| 6e 74 4c 69 73 74 3b 0d | 09 09 69 66 20 28 70 4e |ntList;.|..if (pN|
|00000fa0| 65 78 74 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |extSBPCl|ientData|
|00000fb0| 20 21 3d 20 6e 69 6c 29 | 0d 09 09 09 70 4e 65 78 | != nil)|....pNex|
|00000fc0| 74 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 2d 3e |tSBPClie|ntData->|
|00000fd0| 70 50 72 65 76 53 42 50 | 43 6c 69 65 6e 74 44 61 |pPrevSBP|ClientDa|
|00000fe0| 74 61 20 3d 20 70 53 42 | 50 43 6c 69 65 6e 74 44 |ta = pSB|PClientD|
|00000ff0| 61 74 61 3b 0d 0d 09 09 | 70 53 42 50 43 6c 69 65 |ata;....|pSBPClie|
|00001000| 6e 74 44 61 74 61 2d 3e | 70 50 72 65 76 53 42 50 |ntData->|pPrevSBP|
|00001010| 43 6c 69 65 6e 74 44 61 | 74 61 20 3d 20 6e 69 6c |ClientDa|ta = nil|
|00001020| 3b 0d 09 09 70 53 42 50 | 43 6c 69 65 6e 74 44 61 |;...pSBP|ClientDa|
|00001030| 74 61 2d 3e 70 4e 65 78 | 74 53 42 50 43 6c 69 65 |ta->pNex|tSBPClie|
|00001040| 6e 74 44 61 74 61 20 3d | 20 70 4e 65 78 74 53 42 |ntData =| pNextSB|
|00001050| 50 43 6c 69 65 6e 74 44 | 61 74 61 3b 0d 09 09 67 |PClientD|ata;...g|
|00001060| 70 53 42 50 46 61 6d 69 | 6c 79 44 61 74 61 2d 3e |pSBPFami|lyData->|
|00001070| 70 53 42 50 43 6c 69 65 | 6e 74 4c 69 73 74 20 3d |pSBPClie|ntList =|
|00001080| 20 70 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 3b | pSBPCli|entData;|
|00001090| 0d 09 7d 0d 0d 09 2f 2f | 20 43 72 65 61 74 65 20 |..}...//| Create |
|000010a0| 63 6c 69 65 6e 74 20 41 | 70 70 6c 65 20 45 76 65 |client A|pple Eve|
|000010b0| 6e 74 20 71 75 65 75 65 | 2e 0d 09 69 66 20 28 73 |nt queue|...if (s|
|000010c0| 74 61 74 75 73 20 3d 3d | 20 6e 6f 45 72 72 29 0d |tatus ==| noErr).|
|000010d0| 09 09 73 74 61 74 75 73 | 20 3d 20 53 42 50 43 72 |..status| = SBPCr|
|000010e0| 65 61 74 65 43 6c 69 65 | 6e 74 41 70 70 6c 65 45 |eateClie|ntAppleE|
|000010f0| 76 65 6e 74 51 75 65 75 | 65 20 28 70 53 42 50 43 |ventQueu|e (pSBPC|
|00001100| 6c 69 65 6e 74 44 61 74 | 61 29 3b 0d 0d 09 2f 2f |lientDat|a);...//|
|00001110| 20 43 72 65 61 74 65 20 | 61 6e 20 41 70 70 6c 65 | Create |an Apple|
|00001120| 20 45 76 65 6e 74 20 74 | 61 72 67 65 74 20 64 65 | Event t|arget de|
|00001130| 73 63 72 69 70 74 6f 72 | 20 66 6f 72 20 74 68 65 |scriptor| for the|
|00001140| 20 63 6c 69 65 6e 74 2e | 0d 09 69 66 20 28 73 74 | client.|..if (st|
|00001150| 61 74 75 73 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |atus == |noErr)..|
|00001160| 7b 0d 09 09 73 74 61 74 | 75 73 20 3d 20 47 65 74 |{...stat|us = Get|
|00001170| 43 75 72 72 65 6e 74 50 | 72 6f 63 65 73 73 20 28 |CurrentP|rocess (|
|00001180| 26 63 75 72 72 65 6e 74 | 50 53 4e 29 3b 0d 0d 09 |¤t|PSN);...|
|00001190| 09 69 66 20 28 73 74 61 | 74 75 73 20 3d 3d 20 6e |.if (sta|tus == n|
|000011a0| 6f 45 72 72 29 0d 09 09 | 7b 0d 09 09 09 73 74 61 |oErr)...|{....sta|
|000011b0| 74 75 73 20 3d 20 41 45 | 43 72 65 61 74 65 44 65 |tus = AE|CreateDe|
|000011c0| 73 63 20 28 74 79 70 65 | 50 72 6f 63 65 73 73 53 |sc (type|ProcessS|
|000011d0| 65 72 69 61 6c 4e 75 6d | 62 65 72 2c 0d 09 09 09 |erialNum|ber,....|
|000011e0| 09 09 09 09 09 20 20 20 | 26 63 75 72 72 65 6e 74 |..... |¤t|
|000011f0| 50 53 4e 2c 0d 09 09 09 | 09 09 09 09 09 20 20 20 |PSN,....|..... |
|00001200| 73 69 7a 65 6f 66 20 28 | 50 72 6f 63 65 73 73 53 |sizeof (|ProcessS|
|00001210| 65 72 69 61 6c 4e 75 6d | 62 65 72 29 2c 0d 09 09 |erialNum|ber),...|
|00001220| 09 09 09 09 09 09 20 20 | 20 26 28 70 53 42 50 43 |...... | &(pSBPC|
|00001230| 6c 69 65 6e 74 44 61 74 | 61 2d 3e 63 6c 69 65 6e |lientDat|a->clien|
|00001240| 74 41 45 41 64 64 72 65 | 73 73 29 29 3b 0d 09 09 |tAEAddre|ss));...|
|00001250| 09 69 66 20 28 73 74 61 | 74 75 73 20 3d 3d 20 6e |.if (sta|tus == n|
|00001260| 6f 45 72 72 29 0d 09 09 | 09 09 70 53 42 50 43 6c |oErr)...|..pSBPCl|
|00001270| 69 65 6e 74 44 61 74 61 | 2d 3e 63 6c 69 65 6e 74 |ientData|->client|
|00001280| 41 45 41 64 64 72 65 73 | 73 56 61 6c 69 64 20 3d |AEAddres|sValid =|
|00001290| 20 74 72 75 65 3b 0d 09 | 09 7d 0d 09 7d 0d 0d 09 | true;..|.}..}...|
|000012a0| 2f 2f 20 43 72 65 61 74 | 65 20 61 6e 20 41 70 70 |// Creat|e an App|
|000012b0| 6c 65 20 45 76 65 6e 74 | 20 66 6f 72 20 64 65 76 |le Event| for dev|
|000012c0| 69 63 65 20 61 64 64 65 | 64 20 6e 6f 74 69 66 69 |ice adde|d notifi|
|000012d0| 63 61 74 69 6f 6e 2e 0d | 09 69 66 20 28 73 74 61 |cation..|.if (sta|
|000012e0| 74 75 73 20 3d 3d 20 6e | 6f 45 72 72 29 0d 09 7b |tus == n|oErr)..{|
|000012f0| 0d 09 09 73 74 61 74 75 | 73 20 3d 20 41 45 43 72 |...statu|s = AECr|
|00001300| 65 61 74 65 41 70 70 6c | 65 45 76 65 6e 74 0d 09 |eateAppl|eEvent..|
|00001310| 09 09 09 09 28 6b 41 45 | 53 61 6d 70 6c 65 53 42 |....(kAE|SampleSB|
|00001320| 50 32 45 76 65 6e 74 43 | 6c 61 73 73 2c 0d 09 09 |P2EventC|lass,...|
|00001330| 09 09 09 20 6b 41 45 53 | 61 6d 70 6c 65 53 42 50 |... kAES|ampleSBP|
|00001340| 32 44 65 76 69 63 65 41 | 64 64 65 64 2c 0d 09 09 |2DeviceA|dded,...|
|00001350| 09 09 09 20 26 28 70 53 | 42 50 43 6c 69 65 6e 74 |... &(pS|BPClient|
|00001360| 44 61 74 61 2d 3e 63 6c | 69 65 6e 74 41 45 41 64 |Data->cl|ientAEAd|
|00001370| 64 72 65 73 73 29 2c 0d | 09 09 09 09 09 20 6b 41 |dress),.|..... kA|
|00001380| 75 74 6f 47 65 6e 65 72 | 61 74 65 52 65 74 75 72 |utoGener|ateRetur|
|00001390| 6e 49 44 2c 0d 09 09 09 | 09 09 20 6b 41 6e 79 54 |nID,....|.. kAnyT|
|000013a0| 72 61 6e 73 61 63 74 69 | 6f 6e 49 44 2c 0d 09 09 |ransacti|onID,...|
|000013b0| 09 09 09 20 26 28 70 53 | 42 50 43 6c 69 65 6e 74 |... &(pS|BPClient|
|000013c0| 44 61 74 61 2d 3e 64 65 | 76 69 63 65 41 64 64 65 |Data->de|viceAdde|
|000013d0| 64 41 70 70 6c 65 45 76 | 65 6e 74 29 29 3b 0d 09 |dAppleEv|ent));..|
|000013e0| 09 69 66 20 28 73 74 61 | 74 75 73 20 3d 3d 20 6e |.if (sta|tus == n|
|000013f0| 6f 45 72 72 29 0d 09 09 | 09 70 53 42 50 43 6c 69 |oErr)...|.pSBPCli|
|00001400| 65 6e 74 44 61 74 61 2d | 3e 64 65 76 69 63 65 41 |entData-|>deviceA|
|00001410| 64 64 65 64 41 70 70 6c | 65 45 76 65 6e 74 56 61 |ddedAppl|eEventVa|
|00001420| 6c 69 64 20 3d 20 74 72 | 75 65 3b 0d 09 7d 0d 0d |lid = tr|ue;..}..|
|00001430| 09 2f 2f 20 43 72 65 61 | 74 65 20 61 6e 20 41 70 |.// Crea|te an Ap|
|00001440| 70 6c 65 20 45 76 65 6e | 74 20 66 6f 72 20 64 65 |ple Even|t for de|
|00001450| 76 69 63 65 20 72 65 6d | 6f 76 65 64 20 6e 6f 74 |vice rem|oved not|
|00001460| 69 66 69 63 61 74 69 6f | 6e 2e 0d 09 69 66 20 28 |ificatio|n...if (|
|00001470| 73 74 61 74 75 73 20 3d | 3d 20 6e 6f 45 72 72 29 |status =|= noErr)|
|00001480| 0d 09 7b 0d 09 09 73 74 | 61 74 75 73 20 3d 20 41 |..{...st|atus = A|
|00001490| 45 43 72 65 61 74 65 41 | 70 70 6c 65 45 76 65 6e |ECreateA|ppleEven|
|000014a0| 74 0d 09 09 09 09 09 28 | 6b 41 45 53 61 6d 70 6c |t......(|kAESampl|
|000014b0| 65 53 42 50 32 45 76 65 | 6e 74 43 6c 61 73 73 2c |eSBP2Eve|ntClass,|
|000014c0| 0d 09 09 09 09 09 20 6b | 41 45 53 61 6d 70 6c 65 |...... k|AESample|
|000014d0| 53 42 50 32 44 65 76 69 | 63 65 52 65 6d 6f 76 65 |SBP2Devi|ceRemove|
|000014e0| 64 2c 0d 09 09 09 09 09 | 20 26 28 70 53 42 50 43 |d,......| &(pSBPC|
|000014f0| 6c 69 65 6e 74 44 61 74 | 61 2d 3e 63 6c 69 65 6e |lientDat|a->clien|
|00001500| 74 41 45 41 64 64 72 65 | 73 73 29 2c 0d 09 09 09 |tAEAddre|ss),....|
|00001510| 09 09 20 6b 41 75 74 6f | 47 65 6e 65 72 61 74 65 |.. kAuto|Generate|
|00001520| 52 65 74 75 72 6e 49 44 | 2c 0d 09 09 09 09 09 20 |ReturnID|,...... |
|00001530| 6b 41 6e 79 54 72 61 6e | 73 61 63 74 69 6f 6e 49 |kAnyTran|sactionI|
|00001540| 44 2c 0d 09 09 09 09 09 | 20 26 28 70 53 42 50 43 |D,......| &(pSBPC|
|00001550| 6c 69 65 6e 74 44 61 74 | 61 2d 3e 64 65 76 69 63 |lientDat|a->devic|
|00001560| 65 52 65 6d 6f 76 65 64 | 41 70 70 6c 65 45 76 65 |eRemoved|AppleEve|
|00001570| 6e 74 29 29 3b 0d 09 09 | 69 66 20 28 73 74 61 74 |nt));...|if (stat|
|00001580| 75 73 20 3d 3d 20 6e 6f | 45 72 72 29 0d 09 09 09 |us == no|Err)....|
|00001590| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 2d 3e |pSBPClie|ntData->|
|000015a0| 64 65 76 69 63 65 52 65 | 6d 6f 76 65 64 41 70 70 |deviceRe|movedApp|
|000015b0| 6c 65 45 76 65 6e 74 56 | 61 6c 69 64 20 3d 20 74 |leEventV|alid = t|
|000015c0| 72 75 65 3b 0d 09 7d 0d | 0d 09 2f 2f 20 43 6c 65 |rue;..}.|..// Cle|
|000015d0| 61 6e 20 75 70 20 6f 6e | 20 65 72 72 6f 72 2e 0d |an up on| error..|
|000015e0| 09 69 66 20 28 73 74 61 | 74 75 73 20 21 3d 20 6e |.if (sta|tus != n|
|000015f0| 6f 45 72 72 29 0d 09 7b | 0d 09 09 69 66 20 28 73 |oErr)..{|...if (s|
|00001600| 62 70 43 6c 69 65 6e 74 | 49 44 20 21 3d 20 6b 49 |bpClient|ID != kI|
|00001610| 6e 76 61 6c 69 64 53 42 | 50 43 6c 69 65 6e 74 49 |nvalidSB|PClientI|
|00001620| 44 29 0d 09 09 09 55 6e | 72 65 67 69 73 74 65 72 |D)....Un|register|
|00001630| 53 42 50 43 6c 69 65 6e | 74 41 70 70 6c 69 63 61 |SBPClien|tApplica|
|00001640| 74 69 6f 6e 20 28 73 62 | 70 43 6c 69 65 6e 74 49 |tion (sb|pClientI|
|00001650| 44 29 3b 0d 09 7d 0d 0d | 09 2f 2f 20 52 65 74 75 |D);..}..|.// Retu|
|00001660| 72 6e 20 72 65 73 75 6c | 74 73 2e 0d 09 2a 70 53 |rn resul|ts...*pS|
|00001670| 42 50 43 6c 69 65 6e 74 | 49 44 20 3d 20 73 62 70 |BPClient|ID = sbp|
|00001680| 43 6c 69 65 6e 74 49 44 | 3b 0d 0d 09 72 65 74 75 |ClientID|;...retu|
|00001690| 72 6e 20 28 73 74 61 74 | 75 73 29 3b 0d 7d 0d 0d |rn (stat|us);.}..|
|000016a0| 0d 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.///////|////////|
|000016b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000016c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000016d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000016e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000016f0| 2f 0d 2f 2f 0d 2f 2f 20 | 55 6e 72 65 67 69 73 74 |/.//.// |Unregist|
|00001700| 65 72 53 42 50 43 6c 69 | 65 6e 74 41 70 70 6c 69 |erSBPCli|entAppli|
|00001710| 63 61 74 69 6f 6e 0d 2f | 2f 0d 2f 2f 20 20 20 54 |cation./|/.// T|
|00001720| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 75 6e 72 65 |his rout|ine unre|
|00001730| 67 69 73 74 65 72 73 20 | 74 68 65 20 63 61 6c 6c |gisters |the call|
|00001740| 69 6e 67 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |ing appl|ication |
|00001750| 61 73 20 61 20 63 6c 69 | 65 6e 74 20 6f 66 20 74 |as a cli|ent of t|
|00001760| 68 65 0d 2f 2f 20 53 61 | 6d 70 6c 65 20 53 42 50 |he.// Sa|mple SBP|
|00001770| 20 66 61 6d 69 6c 79 2e | 0d 2f 2f 0d 0d 4f 53 53 | family.|.//..OSS|
|00001780| 74 61 74 75 73 09 55 6e | 72 65 67 69 73 74 65 72 |tatus.Un|register|
|00001790| 53 42 50 43 6c 69 65 6e | 74 41 70 70 6c 69 63 61 |SBPClien|tApplica|
|000017a0| 74 69 6f 6e 28 0d 09 53 | 42 50 43 6c 69 65 6e 74 |tion(..S|BPClient|
|000017b0| 49 44 09 09 09 09 09 73 | 62 70 43 6c 69 65 6e 74 |ID.....s|bpClient|
|000017c0| 49 44 29 0d 7b 0d 09 53 | 42 50 43 6c 69 65 6e 74 |ID).{..S|BPClient|
|000017d0| 44 61 74 61 50 74 72 09 | 09 09 70 53 42 50 43 6c |DataPtr.|..pSBPCl|
|000017e0| 69 65 6e 74 44 61 74 61 | 2c 0d 09 09 09 09 09 09 |ientData|,.......|
|000017f0| 09 09 70 50 72 65 76 53 | 42 50 43 6c 69 65 6e 74 |..pPrevS|BPClient|
|00001800| 44 61 74 61 2c 0d 09 09 | 09 09 09 09 09 09 70 4e |Data,...|......pN|
|00001810| 65 78 74 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |extSBPCl|ientData|
|00001820| 3b 0d 09 4f 53 53 74 61 | 74 75 73 09 09 09 09 09 |;..OSSta|tus.....|
|00001830| 73 74 61 74 75 73 20 3d | 20 6e 6f 45 72 72 3b 0d |status =| noErr;.|
|00001840| 0d 09 69 66 20 28 73 62 | 70 43 6c 69 65 6e 74 49 |..if (sb|pClientI|
|00001850| 44 20 21 3d 20 6b 49 6e | 76 61 6c 69 64 53 42 50 |D != kIn|validSBP|
|00001860| 43 6c 69 65 6e 74 49 44 | 29 0d 09 7b 0d 09 09 2f |ClientID|)..{.../|
|00001870| 2f 20 47 65 74 20 63 6c | 69 65 6e 74 20 64 61 74 |/ Get cl|ient dat|
|00001880| 61 20 66 72 6f 6d 20 49 | 44 2e 0d 09 09 70 53 42 |a from I|D....pSB|
|00001890| 50 43 6c 69 65 6e 74 44 | 61 74 61 20 3d 20 28 53 |PClientD|ata = (S|
|000018a0| 42 50 43 6c 69 65 6e 74 | 44 61 74 61 50 74 72 29 |BPClient|DataPtr)|
|000018b0| 20 73 62 70 43 6c 69 65 | 6e 74 49 44 3b 0d 0d 09 | sbpClie|ntID;...|
|000018c0| 09 2f 2f 20 44 65 61 6c | 6c 6f 63 61 74 65 20 64 |.// Deal|locate d|
|000018d0| 65 76 69 63 65 20 72 65 | 6d 6f 76 65 64 20 41 70 |evice re|moved Ap|
|000018e0| 70 6c 65 20 45 76 65 6e | 74 2e 0d 09 09 69 66 20 |ple Even|t....if |
|000018f0| 28 70 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 2d |(pSBPCli|entData-|
|00001900| 3e 64 65 76 69 63 65 52 | 65 6d 6f 76 65 64 41 70 |>deviceR|emovedAp|
|00001910| 70 6c 65 45 76 65 6e 74 | 56 61 6c 69 64 29 0d 09 |pleEvent|Valid)..|
|00001920| 09 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 20 |..AEDisp|oseDesc |
|00001930| 28 26 28 70 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |(&(pSBPC|lientDat|
|00001940| 61 2d 3e 64 65 76 69 63 | 65 52 65 6d 6f 76 65 64 |a->devic|eRemoved|
|00001950| 41 70 70 6c 65 45 76 65 | 6e 74 29 29 3b 0d 0d 09 |AppleEve|nt));...|
|00001960| 09 2f 2f 20 44 65 61 6c | 6c 6f 63 61 74 65 20 64 |.// Deal|locate d|
|00001970| 65 76 69 63 65 20 61 64 | 64 65 64 20 41 70 70 6c |evice ad|ded Appl|
|00001980| 65 20 45 76 65 6e 74 2e | 0d 09 09 69 66 20 28 70 |e Event.|...if (p|
|00001990| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 2d 3e 64 |SBPClien|tData->d|
|000019a0| 65 76 69 63 65 41 64 64 | 65 64 41 70 70 6c 65 45 |eviceAdd|edAppleE|
|000019b0| 76 65 6e 74 56 61 6c 69 | 64 29 0d 09 09 09 41 45 |ventVali|d)....AE|
|000019c0| 44 69 73 70 6f 73 65 44 | 65 73 63 20 28 26 28 70 |DisposeD|esc (&(p|
|000019d0| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 2d 3e 64 |SBPClien|tData->d|
|000019e0| 65 76 69 63 65 41 64 64 | 65 64 41 70 70 6c 65 45 |eviceAdd|edAppleE|
|000019f0| 76 65 6e 74 29 29 3b 0d | 0d 09 09 2f 2f 20 44 65 |vent));.|...// De|
|00001a00| 61 6c 6c 6f 63 61 74 65 | 20 74 61 72 67 65 74 20 |allocate| target |
|00001a10| 64 65 73 63 72 69 70 74 | 6f 72 2e 0d 09 09 69 66 |descript|or....if|
|00001a20| 20 28 70 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 | (pSBPCl|ientData|
|00001a30| 2d 3e 63 6c 69 65 6e 74 | 41 45 41 64 64 72 65 73 |->client|AEAddres|
|00001a40| 73 56 61 6c 69 64 29 0d | 09 09 09 41 45 44 69 73 |sValid).|...AEDis|
|00001a50| 70 6f 73 65 44 65 73 63 | 20 28 26 28 70 53 42 50 |poseDesc| (&(pSBP|
|00001a60| 43 6c 69 65 6e 74 44 61 | 74 61 2d 3e 63 6c 69 65 |ClientDa|ta->clie|
|00001a70| 6e 74 41 45 41 64 64 72 | 65 73 73 29 29 3b 0d 0d |ntAEAddr|ess));..|
|00001a80| 09 09 2f 2f 20 44 69 73 | 70 6f 73 65 20 6f 66 20 |..// Dis|pose of |
|00001a90| 63 6c 69 65 6e 74 20 41 | 70 70 6c 65 20 45 76 65 |client A|pple Eve|
|00001aa0| 6e 74 20 71 75 65 75 65 | 2e 0d 09 09 69 66 20 28 |nt queue|....if (|
|00001ab0| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 2d 3e |pSBPClie|ntData->|
|00001ac0| 63 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |clientAp|pleEvent|
|00001ad0| 51 75 65 75 65 20 21 3d | 20 6e 69 6c 29 0d 09 09 |Queue !=| nil)...|
|00001ae0| 09 53 42 50 44 69 73 70 | 6f 73 65 43 6c 69 65 6e |.SBPDisp|oseClien|
|00001af0| 74 41 70 70 6c 65 45 76 | 65 6e 74 51 75 65 75 65 |tAppleEv|entQueue|
|00001b00| 20 28 70 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 | (pSBPCl|ientData|
|00001b10| 29 3b 0d 0d 09 09 2f 2f | 20 52 65 6d 6f 76 65 20 |);....//| Remove |
|00001b20| 63 6c 69 65 6e 74 20 66 | 72 6f 6d 20 6c 69 73 74 |client f|rom list|
|00001b30| 2e 0d 09 09 70 50 72 65 | 76 53 42 50 43 6c 69 65 |....pPre|vSBPClie|
|00001b40| 6e 74 44 61 74 61 20 3d | 20 70 53 42 50 43 6c 69 |ntData =| pSBPCli|
|00001b50| 65 6e 74 44 61 74 61 2d | 3e 70 50 72 65 76 53 42 |entData-|>pPrevSB|
|00001b60| 50 43 6c 69 65 6e 74 44 | 61 74 61 3b 0d 09 09 70 |PClientD|ata;...p|
|00001b70| 4e 65 78 74 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |NextSBPC|lientDat|
|00001b80| 61 20 3d 20 70 53 42 50 | 43 6c 69 65 6e 74 44 61 |a = pSBP|ClientDa|
|00001b90| 74 61 2d 3e 70 4e 65 78 | 74 53 42 50 43 6c 69 65 |ta->pNex|tSBPClie|
|00001ba0| 6e 74 44 61 74 61 3b 0d | 0d 09 09 69 66 20 28 70 |ntData;.|...if (p|
|00001bb0| 50 72 65 76 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |PrevSBPC|lientDat|
|00001bc0| 61 20 21 3d 20 6e 69 6c | 29 0d 09 09 09 70 50 72 |a != nil|)....pPr|
|00001bd0| 65 76 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 2d |evSBPCli|entData-|
|00001be0| 3e 70 4e 65 78 74 53 42 | 50 43 6c 69 65 6e 74 44 |>pNextSB|PClientD|
|00001bf0| 61 74 61 20 3d 20 70 4e | 65 78 74 53 42 50 43 6c |ata = pN|extSBPCl|
|00001c00| 69 65 6e 74 44 61 74 61 | 3b 0d 09 09 65 6c 73 65 |ientData|;...else|
|00001c10| 0d 09 09 09 67 70 53 42 | 50 46 61 6d 69 6c 79 44 |....gpSB|PFamilyD|
|00001c20| 61 74 61 2d 3e 70 53 42 | 50 43 6c 69 65 6e 74 4c |ata->pSB|PClientL|
|00001c30| 69 73 74 20 3d 20 70 4e | 65 78 74 53 42 50 43 6c |ist = pN|extSBPCl|
|00001c40| 69 65 6e 74 44 61 74 61 | 3b 0d 0d 09 09 69 66 20 |ientData|;....if |
|00001c50| 28 70 4e 65 78 74 53 42 | 50 43 6c 69 65 6e 74 44 |(pNextSB|PClientD|
|00001c60| 61 74 61 20 21 3d 20 6e | 69 6c 29 0d 09 09 09 70 |ata != n|il)....p|
|00001c70| 4e 65 78 74 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |NextSBPC|lientDat|
|00001c80| 61 2d 3e 70 50 72 65 76 | 53 42 50 43 6c 69 65 6e |a->pPrev|SBPClien|
|00001c90| 74 44 61 74 61 20 3d 20 | 70 50 72 65 76 53 42 50 |tData = |pPrevSBP|
|00001ca0| 43 6c 69 65 6e 74 44 61 | 74 61 3b 0d 0d 09 09 2f |ClientDa|ta;..../|
|00001cb0| 2f 20 44 65 61 6c 6c 6f | 63 61 74 65 20 63 6c 69 |/ Deallo|cate cli|
|00001cc0| 65 6e 74 20 64 61 74 61 | 20 72 65 63 6f 72 64 2e |ent data| record.|
|00001cd0| 0d 09 09 50 6f 6f 6c 44 | 65 61 6c 6c 6f 63 61 74 |...PoolD|eallocat|
|00001ce0| 65 20 28 28 50 74 72 29 | 20 70 53 42 50 43 6c 69 |e ((Ptr)| pSBPCli|
|00001cf0| 65 6e 74 44 61 74 61 29 | 3b 0d 09 7d 0d 0d 09 72 |entData)|;..}...r|
|00001d00| 65 74 75 72 6e 20 28 73 | 74 61 74 75 73 29 3b 0d |eturn (s|tatus);.|
|00001d10| 7d 0d 0d 0d 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |}...////|////////|
|00001d20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00001d30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00001d40| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00001d50| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00001d60| 2f 2f 2f 2f 0d 2f 2f 0d | 2f 2f 20 47 65 74 53 42 |////.//.|// GetSB|
|00001d70| 50 44 72 69 76 65 72 4c | 69 73 74 0d 2f 2f 0d 2f |PDriverL|ist.//./|
|00001d80| 2f 20 20 20 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |/ This| routine|
|00001d90| 20 72 65 74 75 72 6e 73 | 20 61 20 6c 69 73 74 20 | returns| a list |
|00001da0| 6f 66 20 53 61 6d 70 6c | 65 20 53 42 50 20 64 72 |of Sampl|e SBP dr|
|00001db0| 69 76 65 72 20 49 44 73 | 20 61 6e 64 20 74 68 65 |iver IDs| and the|
|00001dc0| 0d 2f 2f 20 6e 75 6d 62 | 65 72 20 6f 66 20 64 72 |.// numb|er of dr|
|00001dd0| 69 76 65 72 73 20 69 6e | 73 74 61 6c 6c 65 64 20 |ivers in|stalled |
|00001de0| 69 6e 20 74 68 65 20 73 | 79 73 74 65 6d 2e 0d 2f |in the s|ystem../|
|00001df0| 2f 0d 0d 4f 53 53 74 61 | 74 75 73 09 47 65 74 53 |/..OSSta|tus.GetS|
|00001e00| 42 50 44 72 69 76 65 72 | 4c 69 73 74 28 0d 09 53 |BPDriver|List(..S|
|00001e10| 42 50 44 72 69 76 65 72 | 49 44 09 09 09 09 09 2a |BPDriver|ID.....*|
|00001e20| 70 53 42 50 44 72 69 76 | 65 72 49 44 4c 69 73 74 |pSBPDriv|erIDList|
|00001e30| 2c 0d 09 55 49 6e 74 33 | 32 09 09 09 09 09 09 73 |,..UInt3|2......s|
|00001e40| 62 70 44 72 69 76 65 72 | 49 44 4c 69 73 74 53 69 |bpDriver|IDListSi|
|00001e50| 7a 65 2c 0d 09 55 49 6e | 74 33 32 09 09 09 09 09 |ze,..UIn|t32.....|
|00001e60| 09 2a 70 4e 75 6d 53 42 | 50 44 72 69 76 65 72 73 |.*pNumSB|PDrivers|
|00001e70| 29 0d 7b 0d 09 53 42 50 | 44 72 69 76 65 72 44 61 |).{..SBP|DriverDa|
|00001e80| 74 61 50 74 72 09 09 09 | 70 53 42 50 44 72 69 76 |taPtr...|pSBPDriv|
|00001e90| 65 72 44 61 74 61 3b 0d | 09 55 49 6e 74 33 32 09 |erData;.|.UInt32.|
|00001ea0| 09 09 09 09 09 6e 75 6d | 53 42 50 44 72 69 76 65 |.....num|SBPDrive|
|00001eb0| 72 73 2c 0d 09 09 09 09 | 09 09 09 09 6e 75 6d 53 |rs,.....|....numS|
|00001ec0| 42 50 44 72 69 76 65 72 | 73 49 6e 4c 69 73 74 2c |BPDriver|sInList,|
|00001ed0| 0d 09 09 09 09 09 09 09 | 09 64 72 69 76 65 72 4e |........|.driverN|
|00001ee0| 75 6d 3b 0d 09 4f 53 53 | 74 61 74 75 73 09 09 09 |um;..OSS|tatus...|
|00001ef0| 09 09 73 74 61 74 75 73 | 20 3d 20 6e 6f 45 72 72 |..status| = noErr|
|00001f00| 3b 0d 0d 09 2f 2f 20 43 | 6f 6d 70 75 74 65 20 6e |;...// C|ompute n|
|00001f10| 75 6d 62 65 72 20 6f 66 | 20 64 72 69 76 65 72 73 |umber of| drivers|
|00001f20| 20 74 6f 20 70 75 74 20 | 69 6e 20 6c 69 73 74 2e | to put |in list.|
|00001f30| 0d 09 6e 75 6d 53 42 50 | 44 72 69 76 65 72 73 20 |..numSBP|Drivers |
|00001f40| 3d 20 67 70 53 42 50 46 | 61 6d 69 6c 79 44 61 74 |= gpSBPF|amilyDat|
|00001f50| 61 2d 3e 6e 75 6d 53 42 | 50 44 72 69 76 65 72 73 |a->numSB|PDrivers|
|00001f60| 3b 0d 09 6e 75 6d 53 42 | 50 44 72 69 76 65 72 73 |;..numSB|PDrivers|
|00001f70| 49 6e 4c 69 73 74 20 3d | 20 73 62 70 44 72 69 76 |InList =| sbpDriv|
|00001f80| 65 72 49 44 4c 69 73 74 | 53 69 7a 65 3b 0d 09 69 |erIDList|Size;..i|
|00001f90| 66 20 28 6e 75 6d 53 42 | 50 44 72 69 76 65 72 73 |f (numSB|PDrivers|
|00001fa0| 49 6e 4c 69 73 74 20 3e | 20 6e 75 6d 53 42 50 44 |InList >| numSBPD|
|00001fb0| 72 69 76 65 72 73 29 0d | 09 09 6e 75 6d 53 42 50 |rivers).|..numSBP|
|00001fc0| 44 72 69 76 65 72 73 49 | 6e 4c 69 73 74 20 3d 20 |DriversI|nList = |
|00001fd0| 6e 75 6d 53 42 50 44 72 | 69 76 65 72 73 3b 0d 0d |numSBPDr|ivers;..|
|00001fe0| 09 2f 2f 20 43 6f 70 79 | 20 64 72 69 76 65 72 20 |.// Copy| driver |
|00001ff0| 49 44 73 20 69 6e 20 6f | 72 64 65 72 2e 0d 09 70 |IDs in o|rder...p|
|00002000| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 20 3d 20 |SBPDrive|rData = |
|00002010| 67 70 53 42 50 46 61 6d | 69 6c 79 44 61 74 61 2d |gpSBPFam|ilyData-|
|00002020| 3e 70 53 42 50 44 72 69 | 76 65 72 4c 69 73 74 3b |>pSBPDri|verList;|
|00002030| 0d 09 66 6f 72 20 28 64 | 72 69 76 65 72 4e 75 6d |..for (d|riverNum|
|00002040| 20 3d 20 30 3b 20 64 72 | 69 76 65 72 4e 75 6d 20 | = 0; dr|iverNum |
|00002050| 3c 20 6e 75 6d 53 42 50 | 44 72 69 76 65 72 73 49 |< numSBP|DriversI|
|00002060| 6e 4c 69 73 74 3b 20 64 | 72 69 76 65 72 4e 75 6d |nList; d|riverNum|
|00002070| 2b 2b 29 0d 09 7b 0d 09 | 09 70 53 42 50 44 72 69 |++)..{..|.pSBPDri|
|00002080| 76 65 72 49 44 4c 69 73 | 74 5b 64 72 69 76 65 72 |verIDLis|t[driver|
|00002090| 4e 75 6d 5d 20 3d 20 28 | 53 42 50 44 72 69 76 65 |Num] = (|SBPDrive|
|000020a0| 72 49 44 29 20 70 53 42 | 50 44 72 69 76 65 72 44 |rID) pSB|PDriverD|
|000020b0| 61 74 61 3b 0d 09 09 70 | 53 42 50 44 72 69 76 65 |ata;...p|SBPDrive|
|000020c0| 72 44 61 74 61 20 3d 20 | 70 53 42 50 44 72 69 76 |rData = |pSBPDriv|
|000020d0| 65 72 44 61 74 61 2d 3e | 70 4e 65 78 74 53 42 50 |erData->|pNextSBP|
|000020e0| 44 72 69 76 65 72 44 61 | 74 61 3b 0d 09 7d 0d 0d |DriverDa|ta;..}..|
|000020f0| 09 2f 2f 20 52 65 74 75 | 72 6e 20 6e 75 6d 62 65 |.// Retu|rn numbe|
|00002100| 72 20 6f 66 20 69 6e 73 | 74 61 6c 6c 65 64 20 64 |r of ins|talled d|
|00002110| 72 69 76 65 72 73 2e 0d | 09 2a 70 4e 75 6d 53 42 |rivers..|.*pNumSB|
|00002120| 50 44 72 69 76 65 72 73 | 20 3d 20 6e 75 6d 53 42 |PDrivers| = numSB|
|00002130| 50 44 72 69 76 65 72 73 | 3b 0d 0d 09 72 65 74 75 |PDrivers|;...retu|
|00002140| 72 6e 20 28 73 74 61 74 | 75 73 29 3b 0d 7d 0d 0d |rn (stat|us);.}..|
|00002150| 0d 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.///////|////////|
|00002160| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002170| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002180| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002190| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000021a0| 2f 0d 2f 2f 0d 2f 2f 20 | 43 61 6c 6c 53 42 50 44 |/.//.// |CallSBPD|
|000021b0| 72 69 76 65 72 0d 2f 2f | 0d 2f 2f 20 20 20 54 68 |river.//|.// Th|
|000021c0| 69 73 20 72 6f 75 74 69 | 6e 65 20 73 65 6e 64 73 |is routi|ne sends|
|000021d0| 20 61 20 72 65 71 75 65 | 73 74 20 74 6f 20 74 68 | a reque|st to th|
|000021e0| 65 20 67 69 76 65 6e 20 | 64 72 69 76 65 72 2e 0d |e given |driver..|
|000021f0| 2f 2f 0d 0d 4f 53 53 74 | 61 74 75 73 09 43 61 6c |//..OSSt|atus.Cal|
|00002200| 6c 53 42 50 44 72 69 76 | 65 72 28 0d 09 53 42 50 |lSBPDriv|er(..SBP|
|00002210| 44 72 69 76 65 72 49 44 | 09 09 09 09 09 73 62 70 |DriverID|.....sbp|
|00002220| 44 72 69 76 65 72 49 44 | 2c 0d 09 53 42 50 49 6e |DriverID|,..SBPIn|
|00002230| 74 65 72 66 61 63 65 50 | 61 72 61 6d 73 50 74 72 |terfaceP|aramsPtr|
|00002240| 09 09 70 53 42 50 49 6e | 74 65 72 66 61 63 65 50 |..pSBPIn|terfaceP|
|00002250| 61 72 61 6d 73 29 0d 7b | 0d 09 53 42 50 44 72 69 |arams).{|..SBPDri|
|00002260| 76 65 72 44 61 74 61 50 | 74 72 09 09 09 70 53 42 |verDataP|tr...pSB|
|00002270| 50 44 72 69 76 65 72 44 | 61 74 61 3b 0d 09 43 6e |PDriverD|ata;..Cn|
|00002280| 74 72 6c 50 61 72 61 6d | 09 09 09 09 09 63 6e 74 |trlParam|.....cnt|
|00002290| 72 6c 50 61 72 61 6d 3b | 0d 09 4f 53 53 74 61 74 |rlParam;|..OSStat|
|000022a0| 75 73 09 09 09 09 09 73 | 74 61 74 75 73 20 3d 20 |us.....s|tatus = |
|000022b0| 6e 6f 45 72 72 3b 0d 0d | 09 2f 2f 20 47 65 74 20 |noErr;..|.// Get |
|000022c0| 74 68 65 20 64 72 69 76 | 65 72 20 64 61 74 61 20 |the driv|er data |
|000022d0| 66 72 6f 6d 20 74 68 65 | 20 49 44 2e 0d 09 70 53 |from the| ID...pS|
|000022e0| 42 50 44 72 69 76 65 72 | 44 61 74 61 20 3d 20 28 |BPDriver|Data = (|
|000022f0| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 50 74 72 |SBPDrive|rDataPtr|
|00002300| 29 20 73 62 70 44 72 69 | 76 65 72 49 44 3b 0d 0d |) sbpDri|verID;..|
|00002310| 2f 2a 7a 7a 7a 2a 2f 0d | 09 69 66 20 28 70 53 42 |/*zzz*/.|.if (pSB|
|00002320| 50 44 72 69 76 65 72 44 | 61 74 61 2d 3e 64 65 76 |PDriverD|ata->dev|
|00002330| 69 63 65 44 69 73 63 6f | 6e 6e 65 63 74 65 64 29 |iceDisco|nnected)|
|00002340| 0d 09 09 72 65 74 75 72 | 6e 20 28 2d 31 33 39 29 |...retur|n (-139)|
|00002350| 3b 2f 2f 7a 7a 7a 20 6e | 65 65 64 20 64 69 73 63 |;//zzz n|eed disc|
|00002360| 6f 6e 6e 65 63 74 65 64 | 45 72 72 0d 2f 2a 7a 7a |onnected|Err./*zz|
|00002370| 7a 2a 2f 0d 09 2f 2f 20 | 53 65 74 20 75 70 20 63 |z*/..// |Set up c|
|00002380| 6f 6e 74 72 6f 6c 20 70 | 61 72 61 6d 65 74 65 72 |ontrol p|arameter|
|00002390| 73 2e 0d 09 63 6e 74 72 | 6c 50 61 72 61 6d 2e 69 |s...cntr|lParam.i|
|000023a0| 6f 43 6f 6d 70 6c 65 74 | 69 6f 6e 20 3d 20 6e 69 |oComplet|ion = ni|
|000023b0| 6c 3b 0d 09 63 6e 74 72 | 6c 50 61 72 61 6d 2e 69 |l;..cntr|lParam.i|
|000023c0| 6f 56 52 65 66 4e 75 6d | 20 3d 20 30 3b 0d 09 63 |oVRefNum| = 0;..c|
|000023d0| 6e 74 72 6c 50 61 72 61 | 6d 2e 69 6f 43 52 65 66 |ntrlPara|m.ioCRef|
|000023e0| 4e 75 6d 20 3d 20 70 53 | 42 50 44 72 69 76 65 72 |Num = pS|BPDriver|
|000023f0| 44 61 74 61 2d 3e 64 72 | 69 76 65 72 52 65 66 4e |Data->dr|iverRefN|
|00002400| 75 6d 3b 0d 09 63 6e 74 | 72 6c 50 61 72 61 6d 2e |um;..cnt|rlParam.|
|00002410| 63 73 43 6f 64 65 20 3d | 20 63 73 63 53 42 50 43 |csCode =| cscSBPC|
|00002420| 6f 6d 6d 61 6e 64 3b 0d | 09 2a 28 28 50 74 72 20 |ommand;.|.*((Ptr |
|00002430| 2a 29 20 26 28 63 6e 74 | 72 6c 50 61 72 61 6d 2e |*) &(cnt|rlParam.|
|00002440| 63 73 50 61 72 61 6d 5b | 30 5d 29 29 20 3d 20 28 |csParam[|0])) = (|
|00002450| 50 74 72 29 20 70 53 42 | 50 49 6e 74 65 72 66 61 |Ptr) pSB|PInterfa|
|00002460| 63 65 50 61 72 61 6d 73 | 3b 0d 0d 09 2f 2f 20 43 |ceParams|;...// C|
|00002470| 61 6c 6c 20 74 68 65 20 | 64 72 69 76 65 72 2e 0d |all the |driver..|
|00002480| 09 73 74 61 74 75 73 20 | 3d 20 50 42 43 6f 6e 74 |.status |= PBCont|
|00002490| 72 6f 6c 53 79 6e 63 20 | 28 28 50 61 72 6d 42 6c |rolSync |((ParmBl|
|000024a0| 6b 50 74 72 29 20 26 63 | 6e 74 72 6c 50 61 72 61 |kPtr) &c|ntrlPara|
|000024b0| 6d 29 3b 0d 0d 09 72 65 | 74 75 72 6e 20 28 73 74 |m);...re|turn (st|
|000024c0| 61 74 75 73 29 3b 0d 7d | 0d 0d 0d 2f 2f 2f 2f 2f |atus);.}|.../////|
|000024d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000024e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000024f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002500| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002510| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 0d 2f 2f 0d 2f |////////|///.//./|
|00002520| 2f 20 4f 70 65 6e 53 42 | 50 44 72 69 76 65 72 0d |/ OpenSB|PDriver.|
|00002530| 2f 2f 0d 2f 2f 20 20 20 | 54 68 69 73 20 72 6f 75 |//.// |This rou|
|00002540| 74 69 6e 65 20 6f 70 65 | 6e 73 20 61 20 63 6f 6e |tine ope|ns a con|
|00002550| 6e 65 63 74 69 6f 6e 20 | 74 6f 20 74 68 65 20 67 |nection |to the g|
|00002560| 69 76 65 6e 20 64 72 69 | 76 65 72 2e 0d 2f 2f 0d |iven dri|ver..//.|
|00002570| 0d 4f 53 53 74 61 74 75 | 73 09 4f 70 65 6e 53 42 |.OSStatu|s.OpenSB|
|00002580| 50 44 72 69 76 65 72 20 | 28 0d 09 53 42 50 44 72 |PDriver |(..SBPDr|
|00002590| 69 76 65 72 49 44 09 09 | 09 09 09 73 62 70 44 72 |iverID..|...sbpDr|
|000025a0| 69 76 65 72 49 44 29 0d | 7b 0d 09 53 42 50 44 72 |iverID).|{..SBPDr|
|000025b0| 69 76 65 72 44 61 74 61 | 50 74 72 09 09 09 70 53 |iverData|Ptr...pS|
|000025c0| 42 50 44 72 69 76 65 72 | 44 61 74 61 3b 0d 09 4f |BPDriver|Data;..O|
|000025d0| 53 53 74 61 74 75 73 09 | 09 09 09 09 73 74 61 74 |SStatus.|....stat|
|000025e0| 75 73 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 2f 2f |us = noE|rr;...//|
|000025f0| 20 47 65 74 20 74 68 65 | 20 64 72 69 76 65 72 20 | Get the| driver |
|00002600| 64 61 74 61 20 66 72 6f | 6d 20 74 68 65 20 49 44 |data fro|m the ID|
|00002610| 2e 0d 09 70 53 42 50 44 | 72 69 76 65 72 44 61 74 |...pSBPD|riverDat|
|00002620| 61 20 3d 20 28 53 42 50 | 44 72 69 76 65 72 44 61 |a = (SBP|DriverDa|
|00002630| 74 61 50 74 72 29 20 73 | 62 70 44 72 69 76 65 72 |taPtr) s|bpDriver|
|00002640| 49 44 3b 0d 0d 09 2f 2f | 20 4f 6e 65 20 6d 6f 72 |ID;...//| One mor|
|00002650| 65 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 2e 0d 09 70 |e connec|tion...p|
|00002660| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 2d 3e 6e |SBPDrive|rData->n|
|00002670| 75 6d 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 2b 2b 3b |umConnec|tions++;|
|00002680| 0d 0d 09 72 65 74 75 72 | 6e 20 28 73 74 61 74 75 |...retur|n (statu|
|00002690| 73 29 3b 0d 7d 0d 0d 0d | 2f 2f 2f 2f 2f 2f 2f 2f |s);.}...|////////|
|000026a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000026b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000026c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000026d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000026e0| 2f 2f 2f 2f 2f 2f 2f 2f | 0d 2f 2f 0d 2f 2f 20 43 |////////|.//.// C|
|000026f0| 6c 6f 73 65 53 42 50 44 | 72 69 76 65 72 0d 2f 2f |loseSBPD|river.//|
|00002700| 0d 2f 2f 20 20 20 54 68 | 69 73 20 72 6f 75 74 69 |.// Th|is routi|
|00002710| 6e 65 20 63 6c 6f 73 65 | 73 20 61 20 63 6f 6e 6e |ne close|s a conn|
|00002720| 65 63 74 69 6f 6e 20 74 | 6f 20 74 68 65 20 67 69 |ection t|o the gi|
|00002730| 76 65 6e 20 64 72 69 76 | 65 72 2e 0d 2f 2f 0d 0d |ven driv|er..//..|
|00002740| 4f 53 53 74 61 74 75 73 | 09 43 6c 6f 73 65 53 42 |OSStatus|.CloseSB|
|00002750| 50 44 72 69 76 65 72 20 | 28 0d 09 53 42 50 44 72 |PDriver |(..SBPDr|
|00002760| 69 76 65 72 49 44 09 09 | 09 09 09 73 62 70 44 72 |iverID..|...sbpDr|
|00002770| 69 76 65 72 49 44 29 0d | 7b 0d 09 53 42 50 44 72 |iverID).|{..SBPDr|
|00002780| 69 76 65 72 44 61 74 61 | 50 74 72 09 09 09 70 53 |iverData|Ptr...pS|
|00002790| 42 50 44 72 69 76 65 72 | 44 61 74 61 3b 0d 09 4f |BPDriver|Data;..O|
|000027a0| 53 53 74 61 74 75 73 09 | 09 09 09 09 73 74 61 74 |SStatus.|....stat|
|000027b0| 75 73 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 2f 2f |us = noE|rr;...//|
|000027c0| 20 47 65 74 20 74 68 65 | 20 64 72 69 76 65 72 20 | Get the| driver |
|000027d0| 64 61 74 61 20 66 72 6f | 6d 20 74 68 65 20 49 44 |data fro|m the ID|
|000027e0| 2e 0d 09 70 53 42 50 44 | 72 69 76 65 72 44 61 74 |...pSBPD|riverDat|
|000027f0| 61 20 3d 20 28 53 42 50 | 44 72 69 76 65 72 44 61 |a = (SBP|DriverDa|
|00002800| 74 61 50 74 72 29 20 73 | 62 70 44 72 69 76 65 72 |taPtr) s|bpDriver|
|00002810| 49 44 3b 0d 0d 09 2f 2f | 20 4f 6e 65 20 6c 65 73 |ID;...//| One les|
|00002820| 73 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 2e 0d 09 70 |s connec|tion...p|
|00002830| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 2d 3e 6e |SBPDrive|rData->n|
|00002840| 75 6d 43 6f 6e 6e 65 63 | 74 69 6f 6e 73 2d 2d 3b |umConnec|tions--;|
|00002850| 0d 0d 09 2f 2f 20 44 69 | 73 70 6f 73 65 20 64 72 |...// Di|spose dr|
|00002860| 69 76 65 72 20 69 66 20 | 64 65 76 69 63 65 20 68 |iver if |device h|
|00002870| 61 73 20 62 65 65 6e 20 | 64 69 73 63 6f 6e 6e 65 |as been |disconne|
|00002880| 63 74 65 64 2e 0d 09 69 | 66 20 28 28 70 53 42 50 |cted...i|f ((pSBP|
|00002890| 44 72 69 76 65 72 44 61 | 74 61 2d 3e 64 65 76 69 |DriverDa|ta->devi|
|000028a0| 63 65 44 69 73 63 6f 6e | 6e 65 63 74 65 64 29 20 |ceDiscon|nected) |
|000028b0| 26 26 20 28 70 53 42 50 | 44 72 69 76 65 72 44 61 |&& (pSBP|DriverDa|
|000028c0| 74 61 2d 3e 6e 75 6d 43 | 6f 6e 6e 65 63 74 69 6f |ta->numC|onnectio|
|000028d0| 6e 73 20 3d 3d 20 30 29 | 29 0d 09 09 44 69 73 70 |ns == 0)|)...Disp|
|000028e0| 6f 73 65 53 42 50 44 72 | 69 76 65 72 20 28 73 62 |oseSBPDr|iver (sb|
|000028f0| 70 44 72 69 76 65 72 49 | 44 29 3b 0d 0d 09 72 65 |pDriverI|D);...re|
|00002900| 74 75 72 6e 20 28 73 74 | 61 74 75 73 29 3b 0d 7d |turn (st|atus);.}|
|00002910| 0d 0d 0d 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.../////|////////|
|00002920| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002930| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002940| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002950| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002960| 2f 2f 2f 0d 2f 2f 0d 2f | 2f 20 47 65 74 4e 65 78 |///.//./|/ GetNex|
|00002970| 74 53 42 50 43 6c 69 65 | 6e 74 45 76 65 6e 74 0d |tSBPClie|ntEvent.|
|00002980| 2f 2f 0d 2f 2f 20 20 20 | 54 68 69 73 20 72 6f 75 |//.// |This rou|
|00002990| 74 69 6e 65 20 63 68 65 | 63 6b 73 20 69 66 20 61 |tine che|cks if a|
|000029a0| 6e 79 20 63 6c 69 65 6e | 74 20 41 70 70 6c 65 20 |ny clien|t Apple |
|000029b0| 45 76 65 6e 74 73 20 61 | 72 65 20 70 65 6e 64 69 |Events a|re pendi|
|000029c0| 6e 67 20 61 6e 64 20 73 | 65 6e 64 73 20 61 6e 79 |ng and s|ends any|
|000029d0| 0d 2f 2f 20 74 68 61 74 | 20 61 72 65 2e 0d 2f 2f |.// that| are..//|
|000029e0| 0d 0d 4f 53 53 74 61 74 | 75 73 09 47 65 74 4e 65 |..OSStat|us.GetNe|
|000029f0| 78 74 53 42 50 43 6c 69 | 65 6e 74 45 76 65 6e 74 |xtSBPCli|entEvent|
|00002a00| 28 0d 09 53 42 50 43 6c | 69 65 6e 74 49 44 09 09 |(..SBPCl|ientID..|
|00002a10| 09 09 09 73 62 70 43 6c | 69 65 6e 74 49 44 29 0d |...sbpCl|ientID).|
|00002a20| 7b 0d 09 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |{..SBPCl|ientData|
|00002a30| 50 74 72 09 09 09 70 53 | 42 50 43 6c 69 65 6e 74 |Ptr...pS|BPClient|
|00002a40| 44 61 74 61 3b 0d 09 43 | 6c 69 65 6e 74 41 70 70 |Data;..C|lientApp|
|00002a50| 6c 65 45 76 65 6e 74 44 | 61 74 61 50 74 72 09 09 |leEventD|ataPtr..|
|00002a60| 70 43 6c 69 65 6e 74 41 | 70 70 6c 65 45 76 65 6e |pClientA|ppleEven|
|00002a70| 74 44 61 74 61 3b 0d 09 | 41 70 70 6c 65 45 76 65 |tData;..|AppleEve|
|00002a80| 6e 74 09 09 09 09 09 72 | 65 70 6c 79 3b 0d 09 4f |nt.....r|eply;..O|
|00002a90| 53 53 74 61 74 75 73 09 | 09 09 09 09 73 74 61 74 |SStatus.|....stat|
|00002aa0| 75 73 20 3d 20 6e 6f 45 | 72 72 2c 0d 09 09 09 09 |us = noE|rr,.....|
|00002ab0| 09 09 09 09 71 75 65 75 | 65 53 74 61 74 75 73 20 |....queu|eStatus |
|00002ac0| 3d 20 6e 6f 45 72 72 3b | 0d 0d 09 2f 2f 20 47 65 |= noErr;|...// Ge|
|00002ad0| 74 20 63 6c 69 65 6e 74 | 20 64 61 74 61 20 66 72 |t client| data fr|
|00002ae0| 6f 6d 20 49 44 2e 0d 09 | 70 53 42 50 43 6c 69 65 |om ID...|pSBPClie|
|00002af0| 6e 74 44 61 74 61 20 3d | 20 28 53 42 50 43 6c 69 |ntData =| (SBPCli|
|00002b00| 65 6e 74 44 61 74 61 50 | 74 72 29 20 73 62 70 43 |entDataP|tr) sbpC|
|00002b10| 6c 69 65 6e 74 49 44 3b | 0d 0d 09 2f 2f 20 53 65 |lientID;|...// Se|
|00002b20| 6e 64 20 61 6e 79 20 63 | 6c 69 65 6e 74 20 41 70 |nd any c|lient Ap|
|00002b30| 70 6c 65 20 45 76 65 6e | 74 73 20 6f 6e 20 71 75 |ple Even|ts on qu|
|00002b40| 65 75 65 2e 0d 09 77 68 | 69 6c 65 20 28 71 75 65 |eue...wh|ile (que|
|00002b50| 75 65 53 74 61 74 75 73 | 20 3d 3d 20 6e 6f 45 72 |ueStatus| == noEr|
|00002b60| 72 29 0d 09 7b 0d 09 09 | 71 75 65 75 65 53 74 61 |r)..{...|queueSta|
|00002b70| 74 75 73 20 3d 20 50 42 | 44 65 71 75 65 75 65 46 |tus = PB|DequeueF|
|00002b80| 69 72 73 74 20 28 70 53 | 42 50 43 6c 69 65 6e 74 |irst (pS|BPClient|
|00002b90| 44 61 74 61 2d 3e 63 6c | 69 65 6e 74 41 70 70 6c |Data->cl|ientAppl|
|00002ba0| 65 45 76 65 6e 74 51 75 | 65 75 65 2c 0d 09 09 09 |eEventQu|eue,....|
|00002bb0| 09 09 09 09 09 09 20 20 | 28 51 45 6c 65 6d 50 74 |...... |(QElemPt|
|00002bc0| 72 20 2a 29 20 26 70 43 | 6c 69 65 6e 74 41 70 70 |r *) &pC|lientApp|
|00002bd0| 6c 65 45 76 65 6e 74 44 | 61 74 61 29 3b 0d 09 09 |leEventD|ata);...|
|00002be0| 69 66 20 28 71 75 65 75 | 65 53 74 61 74 75 73 20 |if (queu|eStatus |
|00002bf0| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 09 7b 0d 09 09 |== noErr|)...{...|
|00002c00| 09 2f 2f 20 53 65 6e 64 | 20 74 68 65 20 41 70 70 |.// Send| the App|
|00002c10| 6c 65 20 45 76 65 6e 74 | 2e 0d 09 09 09 41 45 53 |le Event|.....AES|
|00002c20| 65 6e 64 20 28 26 28 70 | 43 6c 69 65 6e 74 41 70 |end (&(p|ClientAp|
|00002c30| 70 6c 65 45 76 65 6e 74 | 44 61 74 61 2d 3e 63 6c |pleEvent|Data->cl|
|00002c40| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 29 2c |ientAppl|eEvent),|
|00002c50| 0d 09 09 09 09 09 26 72 | 65 70 6c 79 2c 0d 09 09 |......&r|eply,...|
|00002c60| 09 09 09 70 43 6c 69 65 | 6e 74 41 70 70 6c 65 45 |...pClie|ntAppleE|
|00002c70| 76 65 6e 74 44 61 74 61 | 2d 3e 73 65 6e 64 4d 6f |ventData|->sendMo|
|00002c80| 64 65 2c 0d 09 09 09 09 | 09 70 43 6c 69 65 6e 74 |de,.....|.pClient|
|00002c90| 41 70 70 6c 65 45 76 65 | 6e 74 44 61 74 61 2d 3e |AppleEve|ntData->|
|00002ca0| 73 65 6e 64 50 72 69 6f | 72 69 74 79 2c 0d 09 09 |sendPrio|rity,...|
|00002cb0| 09 09 09 70 43 6c 69 65 | 6e 74 41 70 70 6c 65 45 |...pClie|ntAppleE|
|00002cc0| 76 65 6e 74 44 61 74 61 | 2d 3e 74 69 6d 65 4f 75 |ventData|->timeOu|
|00002cd0| 74 49 6e 54 69 63 6b 73 | 2c 0d 09 09 09 09 09 70 |tInTicks|,......p|
|00002ce0| 43 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |ClientAp|pleEvent|
|00002cf0| 44 61 74 61 2d 3e 69 64 | 6c 65 50 72 6f 63 2c 0d |Data->id|leProc,.|
|00002d00| 09 09 09 09 09 70 43 6c | 69 65 6e 74 41 70 70 6c |.....pCl|ientAppl|
|00002d10| 65 45 76 65 6e 74 44 61 | 74 61 2d 3e 66 69 6c 74 |eEventDa|ta->filt|
|00002d20| 65 72 50 72 6f 63 29 3b | 0d 0d 09 09 09 2f 2f 20 |erProc);|.....// |
|00002d30| 44 69 73 70 6f 73 65 20 | 6f 66 20 72 65 70 6c 79 |Dispose |of reply|
|00002d40| 2e 0d 09 09 09 41 45 44 | 69 73 70 6f 73 65 44 65 |.....AED|isposeDe|
|00002d50| 73 63 20 28 26 72 65 70 | 6c 79 29 3b 0d 0d 09 09 |sc (&rep|ly);....|
|00002d60| 09 2f 2f 20 57 65 27 72 | 65 20 6e 6f 77 20 64 6f |.// We'r|e now do|
|00002d70| 6e 65 20 77 69 74 68 20 | 74 68 65 20 63 6c 69 65 |ne with |the clie|
|00002d80| 6e 74 20 41 70 70 6c 65 | 20 45 76 65 6e 74 20 64 |nt Apple| Event d|
|00002d90| 61 74 61 20 72 65 63 6f | 72 64 2e 0d 09 09 09 44 |ata reco|rd.....D|
|00002da0| 69 73 70 6f 73 65 43 6c | 69 65 6e 74 41 70 70 6c |isposeCl|ientAppl|
|00002db0| 65 45 76 65 6e 74 44 61 | 74 61 20 28 70 43 6c 69 |eEventDa|ta (pCli|
|00002dc0| 65 6e 74 41 70 70 6c 65 | 45 76 65 6e 74 44 61 74 |entApple|EventDat|
|00002dd0| 61 29 3b 0d 09 09 7d 0d | 09 7d 0d 0d 09 72 65 74 |a);...}.|.}...ret|
|00002de0| 75 72 6e 20 28 73 74 61 | 74 75 73 29 3b 0d 7d 0d |urn (sta|tus);.}.|
|00002df0| 0d 0d 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |..//////|////////|
|00002e00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e40| 2f 2f 0d 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |//./////|////////|
|00002e50| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e60| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e70| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e80| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002e90| 2f 2f 2f 0d 2f 2f 0d 2f | 2f 20 50 72 69 76 61 74 |///.//./|/ Privat|
|00002ea0| 65 20 72 6f 75 74 69 6e | 65 73 2e 0d 2f 2f 0d 2f |e routin|es..//./|
|00002eb0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002ec0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002ed0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002ee0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002ef0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 0d |////////|///////.|
|00002f00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f40| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f50| 0d 0d 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |..//////|////////|
|00002f60| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f70| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f80| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002f90| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00002fa0| 2f 2f 0d 2f 2f 0d 2f 2f | 20 49 6e 69 74 69 61 6c |//.//.//| Initial|
|00002fb0| 69 7a 65 53 42 50 46 61 | 6d 69 6c 79 0d 2f 2f 0d |izeSBPFa|mily.//.|
|00002fc0| 2f 2f 20 20 20 54 68 69 | 73 20 72 6f 75 74 69 6e |// Thi|s routin|
|00002fd0| 65 20 69 6e 69 74 69 61 | 6c 69 7a 65 73 20 74 68 |e initia|lizes th|
|00002fe0| 65 20 53 61 6d 70 6c 65 | 20 53 42 50 20 66 61 6d |e Sample| SBP fam|
|00002ff0| 69 6c 79 2e 0d 2f 2f 0d | 0d 6c 6f 6e 67 09 49 6e |ily..//.|.long.In|
|00003000| 69 74 69 61 6c 69 7a 65 | 53 42 50 46 61 6d 69 6c |itialize|SBPFamil|
|00003010| 79 28 76 6f 69 64 29 0d | 7b 0d 09 4f 53 53 74 61 |y(void).|{..OSSta|
|00003020| 74 75 73 09 09 09 09 09 | 73 74 61 74 75 73 20 3d |tus.....|status =|
|00003030| 20 6e 6f 45 72 72 3b 0d | 0d 09 2f 2f 20 41 6c 6c | noErr;.|..// All|
|00003040| 6f 63 61 74 65 20 66 61 | 6d 69 6c 79 20 67 6c 6f |ocate fa|mily glo|
|00003050| 62 61 6c 20 72 65 63 6f | 72 64 2e 0d 09 67 70 53 |bal reco|rd...gpS|
|00003060| 42 50 46 61 6d 69 6c 79 | 44 61 74 61 20 3d 0d 09 |BPFamily|Data =..|
|00003070| 09 28 53 42 50 46 61 6d | 69 6c 79 44 61 74 61 50 |.(SBPFam|ilyDataP|
|00003080| 74 72 29 20 50 6f 6f 6c | 41 6c 6c 6f 63 61 74 65 |tr) Pool|Allocate|
|00003090| 52 65 73 69 64 65 6e 74 | 20 28 73 69 7a 65 6f 66 |Resident| (sizeof|
|000030a0| 20 28 53 42 50 46 61 6d | 69 6c 79 44 61 74 61 29 | (SBPFam|ilyData)|
|000030b0| 2c 20 74 72 75 65 29 3b | 0d 09 69 66 20 28 67 70 |, true);|..if (gp|
|000030c0| 53 42 50 46 61 6d 69 6c | 79 44 61 74 61 20 3d 3d |SBPFamil|yData ==|
|000030d0| 20 6e 69 6c 29 0d 09 09 | 73 74 61 74 75 73 20 3d | nil)...|status =|
|000030e0| 20 6d 65 6d 46 75 6c 6c | 45 72 72 3b 0d 0d 09 72 | memFull|Err;...r|
|000030f0| 65 74 75 72 6e 20 28 28 | 6c 6f 6e 67 29 20 73 74 |eturn ((|long) st|
|00003100| 61 74 75 73 29 3b 0d 7d | 0d 0d 0d 2f 2f 2f 2f 2f |atus);.}|.../////|
|00003110| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003120| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003130| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003140| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003150| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 0d 2f 2f 0d 2f |////////|///.//./|
|00003160| 2f 20 54 65 72 6d 69 6e | 61 74 65 53 42 50 46 61 |/ Termin|ateSBPFa|
|00003170| 6d 69 6c 79 0d 2f 2f 0d | 2f 2f 20 20 20 54 68 69 |mily.//.|// Thi|
|00003180| 73 20 72 6f 75 74 69 6e | 65 20 74 65 72 6d 69 6e |s routin|e termin|
|00003190| 61 74 65 73 20 74 68 65 | 20 53 61 6d 70 6c 65 20 |ates the| Sample |
|000031a0| 53 42 50 20 66 61 6d 69 | 6c 79 2e 0d 2f 2f 0d 0d |SBP fami|ly..//..|
|000031b0| 6c 6f 6e 67 09 54 65 72 | 6d 69 6e 61 74 65 53 42 |long.Ter|minateSB|
|000031c0| 50 46 61 6d 69 6c 79 28 | 76 6f 69 64 29 0d 7b 0d |PFamily(|void).{.|
|000031d0| 09 4f 53 53 74 61 74 75 | 73 09 09 09 09 09 73 74 |.OSStatu|s.....st|
|000031e0| 61 74 75 73 20 3d 20 6e | 6f 45 72 72 3b 0d 0d 09 |atus = n|oErr;...|
|000031f0| 2f 2f 20 44 65 61 6c 6c | 6f 63 61 74 65 20 66 61 |// Deall|ocate fa|
|00003200| 6d 69 6c 79 20 67 6c 6f | 62 61 6c 20 72 65 63 6f |mily glo|bal reco|
|00003210| 72 64 2e 0d 09 69 66 20 | 28 67 70 53 42 50 46 61 |rd...if |(gpSBPFa|
|00003220| 6d 69 6c 79 44 61 74 61 | 20 21 3d 20 6e 69 6c 29 |milyData| != nil)|
|00003230| 0d 09 09 50 6f 6f 6c 44 | 65 61 6c 6c 6f 63 61 74 |...PoolD|eallocat|
|00003240| 65 20 28 28 50 74 72 29 | 20 67 70 53 42 50 46 61 |e ((Ptr)| gpSBPFa|
|00003250| 6d 69 6c 79 44 61 74 61 | 29 3b 0d 0d 09 72 65 74 |milyData|);...ret|
|00003260| 75 72 6e 20 28 28 6c 6f | 6e 67 29 20 73 74 61 74 |urn ((lo|ng) stat|
|00003270| 75 73 29 3b 0d 7d 0d 0d | 0d 2f 2f 2f 2f 2f 2f 2f |us);.}..|.///////|
|00003280| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003290| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000032a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000032b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000032c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 0d 2f 2f 0d 2f 2f 20 |////////|/.//.// |
|000032d0| 49 6e 73 74 61 6c 6c 53 | 42 50 45 78 70 65 72 74 |InstallS|BPExpert|
|000032e0| 0d 2f 2f 0d 2f 2f 20 20 | 20 54 68 69 73 20 72 6f |.//.// | This ro|
|000032f0| 75 74 69 6e 65 20 69 6e | 73 74 61 6c 6c 73 20 74 |utine in|stalls t|
|00003300| 68 65 20 53 61 6d 70 6c | 65 20 53 42 50 20 65 78 |he Sampl|e SBP ex|
|00003310| 70 65 72 74 20 6c 6f 61 | 64 69 6e 67 0d 2f 2f 20 |pert loa|ding.// |
|00003320| 6d 65 63 68 61 6e 69 73 | 6d 2e 0d 2f 2f 0d 0d 4f |mechanis|m..//..O|
|00003330| 53 53 74 61 74 75 73 09 | 49 6e 73 74 61 6c 6c 53 |SStatus.|InstallS|
|00003340| 42 50 45 78 70 65 72 74 | 28 76 6f 69 64 29 0d 7b |BPExpert|(void).{|
|00003350| 0d 09 55 49 6e 74 33 32 | 09 09 09 09 09 09 65 76 |..UInt32|......ev|
|00003360| 65 6e 74 54 61 62 6c 65 | 5b 32 5d 3b 0d 09 4f 53 |entTable|[2];..OS|
|00003370| 53 74 61 74 75 73 09 09 | 09 09 09 73 74 61 74 75 |Status..|...statu|
|00003380| 73 20 3d 20 6e 6f 45 72 | 72 3b 0d 0d 09 67 70 53 |s = noEr|r;...gpS|
|00003390| 42 50 45 78 70 65 72 74 | 44 61 74 61 20 3d 0d 09 |BPExpert|Data =..|
|000033a0| 09 28 53 42 50 45 78 70 | 65 72 74 44 61 74 61 50 |.(SBPExp|ertDataP|
|000033b0| 74 72 29 20 50 6f 6f 6c | 41 6c 6c 6f 63 61 74 65 |tr) Pool|Allocate|
|000033c0| 52 65 73 69 64 65 6e 74 | 20 28 73 69 7a 65 6f 66 |Resident| (sizeof|
|000033d0| 20 28 53 42 50 45 78 70 | 65 72 74 44 61 74 61 29 | (SBPExp|ertData)|
|000033e0| 2c 20 74 72 75 65 29 3b | 0d 09 69 66 20 28 67 70 |, true);|..if (gp|
|000033f0| 53 42 50 45 78 70 65 72 | 74 44 61 74 61 20 3d 3d |SBPExper|tData ==|
|00003400| 20 6e 69 6c 29 0d 09 09 | 73 74 61 74 75 73 20 3d | nil)...|status =|
|00003410| 20 6d 65 6d 46 75 6c 6c | 45 72 72 3b 0d 0d 09 2f | memFull|Err;.../|
|00003420| 2f 20 52 65 67 69 73 74 | 65 72 20 74 6f 20 72 65 |/ Regist|er to re|
|00003430| 63 65 69 76 65 20 67 65 | 6e 65 72 69 63 20 64 65 |ceive ge|neric de|
|00003440| 76 69 63 65 20 61 64 64 | 65 64 20 65 76 65 6e 74 |vice add|ed event|
|00003450| 73 2e 0d 09 69 66 20 28 | 73 74 61 74 75 73 20 3d |s...if (|status =|
|00003460| 3d 20 6e 6f 45 72 72 29 | 0d 09 7b 0d 09 09 65 76 |= noErr)|..{...ev|
|00003470| 65 6e 74 54 61 62 6c 65 | 5b 30 5d 20 3d 20 6b 47 |entTable|[0] = kG|
|00003480| 44 46 44 65 76 69 63 65 | 41 64 64 65 64 45 76 65 |DFDevice|AddedEve|
|00003490| 6e 74 3b 0d 09 09 65 76 | 65 6e 74 54 61 62 6c 65 |nt;...ev|entTable|
|000034a0| 5b 31 5d 20 3d 20 6b 47 | 44 46 44 65 76 69 63 65 |[1] = kG|DFDevice|
|000034b0| 52 65 6d 6f 76 65 64 45 | 76 65 6e 74 3b 0d 09 09 |RemovedE|vent;...|
|000034c0| 73 74 61 74 75 73 20 3d | 20 47 44 46 52 65 67 69 |status =| GDFRegi|
|000034d0| 73 74 65 72 44 65 76 69 | 63 65 45 76 65 6e 74 48 |sterDevi|ceEventH|
|000034e0| 61 6e 64 6c 65 72 50 72 | 6f 63 0d 09 09 09 09 09 |andlerPr|oc......|
|000034f0| 28 6b 4e 64 72 76 54 79 | 70 65 49 73 53 61 6d 70 |(kNdrvTy|peIsSamp|
|00003500| 6c 65 53 42 50 32 2c 0d | 09 09 09 09 09 20 32 2c |leSBP2,.|..... 2,|
|00003510| 0d 09 09 09 09 09 20 26 | 65 76 65 6e 74 54 61 62 |...... &|eventTab|
|00003520| 6c 65 5b 30 5d 2c 0d 09 | 09 09 09 09 20 53 42 50 |le[0],..|.... SBP|
|00003530| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 2c 0d 09 09 |EventHan|dler,...|
|00003540| 09 09 09 20 6e 69 6c 2c | 0d 09 09 09 09 09 20 26 |... nil,|...... &|
|00003550| 28 67 70 53 42 50 45 78 | 70 65 72 74 44 61 74 61 |(gpSBPEx|pertData|
|00003560| 2d 3e 67 64 66 44 65 76 | 69 63 65 45 76 65 6e 74 |->gdfDev|iceEvent|
|00003570| 52 65 67 69 73 74 72 61 | 74 69 6f 6e 49 44 29 29 |Registra|tionID))|
|00003580| 3b 0d 09 7d 0d 09 0d 09 | 72 65 74 75 72 6e 20 73 |;..}....|return s|
|00003590| 74 61 74 75 73 3b 0d 7d | 0d 0d 0d 2f 2f 2f 2f 2f |tatus;.}|.../////|
|000035a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000035b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000035c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000035d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000035e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 0d 2f 2f 0d 2f |////////|///.//./|
|000035f0| 2f 20 55 6e 69 6e 73 74 | 61 6c 6c 53 42 50 45 78 |/ Uninst|allSBPEx|
|00003600| 70 65 72 74 0d 2f 2f 0d | 2f 2f 20 20 20 54 68 69 |pert.//.|// Thi|
|00003610| 73 20 72 6f 75 74 69 6e | 65 20 75 6e 69 6e 73 74 |s routin|e uninst|
|00003620| 61 6c 6c 73 20 74 68 65 | 20 53 61 6d 70 6c 65 20 |alls the| Sample |
|00003630| 53 42 50 20 65 78 70 65 | 72 74 20 6c 6f 61 64 69 |SBP expe|rt loadi|
|00003640| 6e 67 0d 2f 2f 20 6d 65 | 63 68 61 6e 69 73 6d 2e |ng.// me|chanism.|
|00003650| 0d 2f 2f 0d 0d 4f 53 53 | 74 61 74 75 73 09 55 6e |.//..OSS|tatus.Un|
|00003660| 69 6e 73 74 61 6c 6c 53 | 42 50 45 78 70 65 72 74 |installS|BPExpert|
|00003670| 28 76 6f 69 64 29 0d 7b | 0d 09 4f 53 53 74 61 74 |(void).{|..OSStat|
|00003680| 75 73 09 09 09 09 09 73 | 74 61 74 75 73 20 3d 20 |us.....s|tatus = |
|00003690| 6e 6f 45 72 72 3b 0d 0d | 09 2f 2f 20 44 69 73 70 |noErr;..|.// Disp|
|000036a0| 6f 73 65 20 6f 66 20 53 | 42 50 45 78 70 65 72 74 |ose of S|BPExpert|
|000036b0| 20 64 61 74 61 2e 0d 09 | 69 66 20 28 67 70 53 42 | data...|if (gpSB|
|000036c0| 50 45 78 70 65 72 74 44 | 61 74 61 20 21 3d 20 6e |PExpertD|ata != n|
|000036d0| 69 6c 29 0d 09 7b 0d 09 | 09 2f 2f 20 55 6e 72 65 |il)..{..|.// Unre|
|000036e0| 67 69 73 74 65 72 20 77 | 69 74 68 20 47 65 6e 65 |gister w|ith Gene|
|000036f0| 72 69 63 20 44 65 76 69 | 63 65 20 66 61 6d 69 6c |ric Devi|ce famil|
|00003700| 79 2e 0d 09 09 69 66 20 | 28 67 70 53 42 50 45 78 |y....if |(gpSBPEx|
|00003710| 70 65 72 74 44 61 74 61 | 2d 3e 67 64 66 44 65 76 |pertData|->gdfDev|
|00003720| 69 63 65 45 76 65 6e 74 | 52 65 67 69 73 74 72 61 |iceEvent|Registra|
|00003730| 74 69 6f 6e 49 44 20 21 | 3d 0d 09 09 09 6b 49 6e |tionID !|=....kIn|
|00003740| 76 61 6c 69 64 47 44 46 | 44 65 76 69 63 65 45 76 |validGDF|DeviceEv|
|00003750| 65 6e 74 52 65 67 69 73 | 74 72 61 74 69 6f 6e 49 |entRegis|trationI|
|00003760| 44 29 0d 09 09 7b 0d 09 | 09 09 73 74 61 74 75 73 |D)...{..|..status|
|00003770| 20 3d 20 47 44 46 55 6e | 72 65 67 69 73 74 65 72 | = GDFUn|register|
|00003780| 44 65 76 69 63 65 45 76 | 65 6e 74 48 61 6e 64 6c |DeviceEv|entHandl|
|00003790| 65 72 0d 09 09 09 09 09 | 09 28 67 70 53 42 50 45 |er......|.(gpSBPE|
|000037a0| 78 70 65 72 74 44 61 74 | 61 2d 3e 67 64 66 44 65 |xpertDat|a->gdfDe|
|000037b0| 76 69 63 65 45 76 65 6e | 74 52 65 67 69 73 74 72 |viceEven|tRegistr|
|000037c0| 61 74 69 6f 6e 49 44 29 | 3b 0d 09 09 7d 0d 0d 09 |ationID)|;...}...|
|000037d0| 09 50 6f 6f 6c 44 65 61 | 6c 6c 6f 63 61 74 65 20 |.PoolDea|llocate |
|000037e0| 28 28 50 74 72 29 20 67 | 70 53 42 50 45 78 70 65 |((Ptr) g|pSBPExpe|
|000037f0| 72 74 44 61 74 61 29 3b | 0d 09 09 67 70 53 42 50 |rtData);|...gpSBP|
|00003800| 45 78 70 65 72 74 44 61 | 74 61 20 3d 20 6e 69 6c |ExpertDa|ta = nil|
|00003810| 3b 0d 09 7d 0d 0d 09 72 | 65 74 75 72 6e 20 28 73 |;..}...r|eturn (s|
|00003820| 74 61 74 75 73 29 3b 0d | 7d 0d 0d 0d 2f 2f 2f 2f |tatus);.|}...////|
|00003830| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003840| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003850| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003860| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003870| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 0d 2f 2f 2f |////////|////.///|
|00003880| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003890| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000038a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000038b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000038c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 2f 2f |////////|/////.//|
|000038d0| 0d 2f 2f 20 49 6e 74 65 | 72 6e 61 6c 20 72 6f 75 |.// Inte|rnal rou|
|000038e0| 74 69 6e 65 73 2e 0d 2f | 2f 0d 2f 2f 2f 2f 2f 2f |tines../|/.//////|
|000038f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003900| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003910| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003920| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003930| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 0d 2f 2f 2f 2f 2f |////////|//./////|
|00003940| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003950| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003960| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003970| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003980| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 0d 0d 2f 2f 2f |////////|///..///|
|00003990| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000039a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000039b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000039c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000039d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 2f 2f |////////|/////.//|
|000039e0| 0d 2f 2f 20 53 42 50 45 | 76 65 6e 74 48 61 6e 64 |.// SBPE|ventHand|
|000039f0| 6c 65 72 0d 2f 2f 0d 2f | 2f 20 20 20 54 68 69 73 |ler.//./|/ This|
|00003a00| 20 70 72 6f 63 20 68 61 | 6e 64 6c 65 73 20 64 65 | proc ha|ndles de|
|00003a10| 76 69 63 65 20 65 76 65 | 6e 74 73 20 66 6f 72 20 |vice eve|nts for |
|00003a20| 53 61 6d 70 6c 65 20 53 | 42 50 20 64 65 76 69 63 |Sample S|BP devic|
|00003a30| 65 73 2e 0d 2f 2f 0d 0d | 73 74 61 74 69 63 20 4f |es..//..|static O|
|00003a40| 53 53 74 61 74 75 73 09 | 53 42 50 45 76 65 6e 74 |SStatus.|SBPEvent|
|00003a50| 48 61 6e 64 6c 65 72 28 | 0d 09 47 44 46 44 65 76 |Handler(|..GDFDev|
|00003a60| 69 63 65 45 76 65 6e 74 | 44 61 74 61 50 74 72 09 |iceEvent|DataPtr.|
|00003a70| 09 70 47 44 46 44 65 76 | 69 63 65 45 76 65 6e 74 |.pGDFDev|iceEvent|
|00003a80| 44 61 74 61 29 0d 7b 0d | 09 4f 53 53 74 61 74 75 |Data).{.|.OSStatu|
|00003a90| 73 09 09 09 09 09 73 74 | 61 74 75 73 20 3d 20 6e |s.....st|atus = n|
|00003aa0| 6f 45 72 72 3b 0d 0d 09 | 2f 2f 20 44 69 73 70 61 |oErr;...|// Dispa|
|00003ab0| 74 63 68 20 6f 66 66 20 | 6f 66 20 64 65 76 69 63 |tch off |of devic|
|00003ac0| 65 20 65 76 65 6e 74 2e | 0d 09 73 77 69 74 63 68 |e event.|..switch|
|00003ad0| 20 28 70 47 44 46 44 65 | 76 69 63 65 45 76 65 6e | (pGDFDe|viceEven|
|00003ae0| 74 44 61 74 61 2d 3e 64 | 65 76 69 63 65 45 76 65 |tData->d|eviceEve|
|00003af0| 6e 74 29 0d 09 7b 0d 09 | 09 63 61 73 65 20 6b 47 |nt)..{..|.case kG|
|00003b00| 44 46 44 65 76 69 63 65 | 41 64 64 65 64 45 76 65 |DFDevice|AddedEve|
|00003b10| 6e 74 20 3a 0d 09 09 09 | 73 74 61 74 75 73 20 3d |nt :....|status =|
|00003b20| 20 53 42 50 48 61 6e 64 | 6c 65 44 65 76 69 63 65 | SBPHand|leDevice|
|00003b30| 41 64 64 65 64 20 28 70 | 47 44 46 44 65 76 69 63 |Added (p|GDFDevic|
|00003b40| 65 45 76 65 6e 74 44 61 | 74 61 29 3b 0d 09 09 09 |eEventDa|ta);....|
|00003b50| 62 72 65 61 6b 3b 0d 0d | 09 09 63 61 73 65 20 6b |break;..|..case k|
|00003b60| 47 44 46 44 65 76 69 63 | 65 52 65 6d 6f 76 65 64 |GDFDevic|eRemoved|
|00003b70| 45 76 65 6e 74 20 3a 0d | 09 09 09 73 74 61 74 75 |Event :.|...statu|
|00003b80| 73 20 3d 20 53 42 50 48 | 61 6e 64 6c 65 44 65 76 |s = SBPH|andleDev|
|00003b90| 69 63 65 52 65 6d 6f 76 | 65 64 20 28 70 47 44 46 |iceRemov|ed (pGDF|
|00003ba0| 44 65 76 69 63 65 45 76 | 65 6e 74 44 61 74 61 29 |DeviceEv|entData)|
|00003bb0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 0d 09 09 64 |;....bre|ak;....d|
|00003bc0| 65 66 61 75 6c 74 20 3a | 0d 09 09 09 62 72 65 61 |efault :|....brea|
|00003bd0| 6b 3b 0d 09 7d 0d 0d 09 | 72 65 74 75 72 6e 20 28 |k;..}...|return (|
|00003be0| 73 74 61 74 75 73 29 3b | 0d 7d 0d 0d 0d 2f 2f 2f |status);|.}...///|
|00003bf0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003c00| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003c10| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003c20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00003c30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 2f 2f |////////|/////.//|
|00003c40| 0d 2f 2f 20 53 42 50 48 | 61 6e 64 6c 65 44 65 76 |.// SBPH|andleDev|
|00003c50| 69 63 65 41 64 64 65 64 | 0d 2f 2f 0d 2f 2f 20 20 |iceAdded|.//.// |
|00003c60| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 68 61 | This ro|utine ha|
|00003c70| 6e 64 6c 65 73 20 6e 65 | 77 20 64 65 76 69 63 65 |ndles ne|w device|
|00003c80| 73 20 62 65 69 6e 67 20 | 61 64 64 65 64 2e 0d 2f |s being |added../|
|00003c90| 2f 0d 0d 73 74 61 74 69 | 63 20 4f 53 53 74 61 74 |/..stati|c OSStat|
|00003ca0| 75 73 09 53 42 50 48 61 | 6e 64 6c 65 44 65 76 69 |us.SBPHa|ndleDevi|
|00003cb0| 63 65 41 64 64 65 64 28 | 0d 09 47 44 46 44 65 76 |ceAdded(|..GDFDev|
|00003cc0| 69 63 65 45 76 65 6e 74 | 44 61 74 61 50 74 72 09 |iceEvent|DataPtr.|
|00003cd0| 09 70 47 44 46 44 65 76 | 69 63 65 45 76 65 6e 74 |.pGDFDev|iceEvent|
|00003ce0| 44 61 74 61 29 0d 7b 0d | 09 53 42 50 44 72 69 76 |Data).{.|.SBPDriv|
|00003cf0| 65 72 49 44 09 09 09 09 | 09 70 53 42 50 44 72 69 |erID....|.pSBPDri|
|00003d00| 76 65 72 49 44 3b 0d 09 | 53 42 50 44 72 69 76 65 |verID;..|SBPDrive|
|00003d10| 72 44 61 74 61 50 74 72 | 09 09 09 70 53 42 50 44 |rDataPtr|...pSBPD|
|00003d20| 72 69 76 65 72 44 61 74 | 61 3b 0d 0d 09 53 42 50 |riverDat|a;...SBP|
|00003d30| 43 6c 69 65 6e 74 44 61 | 74 61 50 74 72 09 09 09 |ClientDa|taPtr...|
|00003d40| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 3b 0d |pSBPClie|ntData;.|
|00003d50| 0d 09 4f 53 53 74 61 74 | 75 73 09 09 09 09 09 73 |..OSStat|us.....s|
|00003d60| 74 61 74 75 73 20 3d 20 | 6e 6f 45 72 72 2c 0d 09 |tatus = |noErr,..|
|00003d70| 09 09 09 09 09 09 09 63 | 6c 69 65 6e 74 53 74 61 |.......c|lientSta|
|00003d80| 74 75 73 3b 0d 0d 09 2f | 2f 20 43 68 65 63 6b 20 |tus;.../|/ Check |
|00003d90| 69 66 20 53 42 50 20 64 | 72 69 76 65 72 20 69 73 |if SBP d|river is|
|00003da0| 20 69 6e 20 6f 75 72 20 | 6c 69 73 74 2e 20 20 54 | in our |list. T|
|00003db0| 68 69 73 20 77 69 6c 6c | 20 68 61 70 70 65 6e 20 |his will| happen |
|00003dc0| 69 66 20 64 65 76 69 63 | 65 20 77 61 73 0d 09 2f |if devic|e was../|
|00003dd0| 2f 20 63 6f 6e 6e 65 63 | 74 65 64 2c 20 6f 70 65 |/ connec|ted, ope|
|00003de0| 6e 65 64 2c 20 64 69 73 | 63 6f 6e 6e 65 63 74 65 |ned, dis|connecte|
|00003df0| 64 2c 20 61 6e 64 20 72 | 65 63 6f 6e 6e 65 63 74 |d, and r|econnect|
|00003e00| 65 64 20 77 69 74 68 6f | 75 74 20 62 65 69 6e 67 |ed witho|ut being|
|00003e10| 20 63 6c 6f 73 65 64 2e | 0d 09 2f 2f 20 49 66 20 | closed.|..// If |
|00003e20| 69 74 27 73 20 69 6e 20 | 6f 75 72 20 6c 69 73 74 |it's in |our list|
|00003e30| 2c 20 73 65 74 20 64 69 | 73 63 6f 6e 6e 65 63 74 |, set di|sconnect|
|00003e40| 65 64 20 74 6f 20 66 61 | 6c 73 65 2e 0d 09 70 53 |ed to fa|lse...pS|
|00003e50| 42 50 44 72 69 76 65 72 | 49 44 20 3d 20 53 42 50 |BPDriver|ID = SBP|
|00003e60| 46 69 6e 64 44 72 69 76 | 65 72 20 28 26 28 70 47 |FindDriv|er (&(pG|
|00003e70| 44 46 44 65 76 69 63 65 | 45 76 65 6e 74 44 61 74 |DFDevice|EventDat|
|00003e80| 61 2d 3e 64 65 76 69 63 | 65 52 65 67 45 6e 74 72 |a->devic|eRegEntr|
|00003e90| 79 49 44 29 29 3b 0d 09 | 69 66 20 28 70 53 42 50 |yID));..|if (pSBP|
|00003ea0| 44 72 69 76 65 72 49 44 | 20 21 3d 20 6b 49 6e 76 |DriverID| != kInv|
|00003eb0| 61 6c 69 64 53 42 50 44 | 72 69 76 65 72 49 44 29 |alidSBPD|riverID)|
|00003ec0| 0d 09 7b 0d 09 09 70 53 | 42 50 44 72 69 76 65 72 |..{...pS|BPDriver|
|00003ed0| 44 61 74 61 20 3d 20 28 | 53 42 50 44 72 69 76 65 |Data = (|SBPDrive|
|00003ee0| 72 44 61 74 61 50 74 72 | 29 20 70 53 42 50 44 72 |rDataPtr|) pSBPDr|
|00003ef0| 69 76 65 72 49 44 3b 0d | 09 09 70 53 42 50 44 72 |iverID;.|..pSBPDr|
|00003f00| 69 76 65 72 44 61 74 61 | 2d 3e 64 65 76 69 63 65 |iverData|->device|
|00003f10| 44 69 73 63 6f 6e 6e 65 | 63 74 65 64 20 3d 20 66 |Disconne|cted = f|
|00003f20| 61 6c 73 65 3b 0d 09 7d | 0d 09 65 6c 73 65 0d 09 |alse;..}|..else..|
|00003f30| 7b 0d 09 09 73 74 61 74 | 75 73 20 3d 20 53 42 50 |{...stat|us = SBP|
|00003f40| 41 64 64 44 72 69 76 65 | 72 20 28 70 47 44 46 44 |AddDrive|r (pGDFD|
|00003f50| 65 76 69 63 65 45 76 65 | 6e 74 44 61 74 61 2c 20 |eviceEve|ntData, |
|00003f60| 26 70 53 42 50 44 72 69 | 76 65 72 49 44 29 3b 0d |&pSBPDri|verID);.|
|00003f70| 09 09 69 66 20 28 73 74 | 61 74 75 73 20 3d 3d 20 |..if (st|atus == |
|00003f80| 6e 6f 45 72 72 29 0d 09 | 09 09 70 53 42 50 44 72 |noErr)..|..pSBPDr|
|00003f90| 69 76 65 72 44 61 74 61 | 20 3d 20 28 53 42 50 44 |iverData| = (SBPD|
|00003fa0| 72 69 76 65 72 44 61 74 | 61 50 74 72 29 20 70 53 |riverDat|aPtr) pS|
|00003fb0| 42 50 44 72 69 76 65 72 | 49 44 3b 0d 09 7d 0d 0d |BPDriver|ID;..}..|
|00003fc0| 09 2f 2f 20 53 65 6e 64 | 20 75 70 20 6e 6f 74 69 |.// Send| up noti|
|00003fd0| 66 69 63 61 74 69 6f 6e | 20 74 6f 20 61 6c 6c 20 |fication| to all |
|00003fe0| 63 6c 69 65 6e 74 73 2e | 0d 09 69 66 20 28 73 74 |clients.|..if (st|
|00003ff0| 61 74 75 73 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |atus == |noErr)..|
|00004000| 7b 0d 09 09 70 53 42 50 | 43 6c 69 65 6e 74 44 61 |{...pSBP|ClientDa|
|00004010| 74 61 20 3d 20 67 70 53 | 42 50 46 61 6d 69 6c 79 |ta = gpS|BPFamily|
|00004020| 44 61 74 61 2d 3e 70 53 | 42 50 43 6c 69 65 6e 74 |Data->pS|BPClient|
|00004030| 4c 69 73 74 3b 0d 09 09 | 77 68 69 6c 65 20 28 70 |List;...|while (p|
|00004040| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 20 21 3d |SBPClien|tData !=|
|00004050| 20 6e 69 6c 29 0d 09 09 | 7b 0d 09 09 09 2f 2f 20 | nil)...|{....// |
|00004060| 41 64 64 20 74 68 65 20 | 64 72 69 76 65 72 20 49 |Add the |driver I|
|00004070| 44 20 70 61 72 61 6d 65 | 74 65 72 20 74 6f 20 65 |D parame|ter to e|
|00004080| 76 65 6e 74 2e 0d 09 09 | 09 63 6c 69 65 6e 74 53 |vent....|.clientS|
|00004090| 74 61 74 75 73 20 3d 20 | 41 45 50 75 74 50 61 72 |tatus = |AEPutPar|
|000040a0| 61 6d 50 74 72 0d 09 09 | 09 09 09 09 09 28 26 28 |amPtr...|.....(&(|
|000040b0| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 2d 3e |pSBPClie|ntData->|
|000040c0| 64 65 76 69 63 65 41 64 | 64 65 64 41 70 70 6c 65 |deviceAd|dedApple|
|000040d0| 45 76 65 6e 74 29 2c 0d | 09 09 09 09 09 09 09 20 |Event),.|....... |
|000040e0| 6b 41 45 53 42 50 44 72 | 69 76 65 72 49 44 4b 65 |kAESBPDr|iverIDKe|
|000040f0| 79 2c 0d 09 09 09 09 09 | 09 09 20 6b 41 45 53 42 |y,......|.. kAESB|
|00004100| 50 44 72 69 76 65 72 49 | 44 54 79 70 65 2c 0d 09 |PDriverI|DType,..|
|00004110| 09 09 09 09 09 09 20 26 | 70 53 42 50 44 72 69 76 |...... &|pSBPDriv|
|00004120| 65 72 49 44 2c 0d 09 09 | 09 09 09 09 09 20 73 69 |erID,...|..... si|
|00004130| 7a 65 6f 66 20 28 70 53 | 42 50 44 72 69 76 65 72 |zeof (pS|BPDriver|
|00004140| 49 44 29 29 3b 0d 0d 09 | 09 09 2f 2f 20 53 65 6e |ID));...|..// Sen|
|00004150| 64 20 65 76 65 6e 74 2e | 0d 09 09 09 69 66 20 28 |d event.|....if (|
|00004160| 63 6c 69 65 6e 74 53 74 | 61 74 75 73 20 3d 3d 20 |clientSt|atus == |
|00004170| 6e 6f 45 72 72 29 0d 09 | 09 09 7b 0d 09 09 09 09 |noErr)..|..{.....|
|00004180| 63 6c 69 65 6e 74 53 74 | 61 74 75 73 20 3d 20 53 |clientSt|atus = S|
|00004190| 42 50 53 65 6e 64 43 6c | 69 65 6e 74 41 70 70 6c |BPSendCl|ientAppl|
|000041a0| 65 45 76 65 6e 74 0d 09 | 09 09 09 09 09 09 09 28 |eEvent..|.......(|
|000041b0| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 2c 0d |pSBPClie|ntData,.|
|000041c0| 09 09 09 09 09 09 09 09 | 20 26 28 70 53 42 50 43 |........| &(pSBPC|
|000041d0| 6c 69 65 6e 74 44 61 74 | 61 2d 3e 64 65 76 69 63 |lientDat|a->devic|
|000041e0| 65 41 64 64 65 64 41 70 | 70 6c 65 45 76 65 6e 74 |eAddedAp|pleEvent|
|000041f0| 29 2c 0d 09 09 09 09 09 | 09 09 09 20 30 2c 0d 09 |),......|... 0,..|
|00004200| 09 09 09 09 09 09 09 20 | 6b 41 45 4e 6f 72 6d 61 |....... |kAENorma|
|00004210| 6c 50 72 69 6f 72 69 74 | 79 2c 0d 09 09 09 09 09 |lPriorit|y,......|
|00004220| 09 09 09 20 30 2c 0d 09 | 09 09 09 09 09 09 09 20 |... 0,..|....... |
|00004230| 6e 69 6c 2c 0d 09 09 09 | 09 09 09 09 09 20 6e 69 |nil,....|..... ni|
|00004240| 6c 29 3b 0d 09 09 09 7d | 0d 0d 09 09 09 70 53 42 |l);....}|.....pSB|
|00004250| 50 43 6c 69 65 6e 74 44 | 61 74 61 20 3d 20 70 53 |PClientD|ata = pS|
|00004260| 42 50 43 6c 69 65 6e 74 | 44 61 74 61 2d 3e 70 4e |BPClient|Data->pN|
|00004270| 65 78 74 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |extSBPCl|ientData|
|00004280| 3b 0d 09 09 7d 0d 09 7d | 0d 0d 09 72 65 74 75 72 |;...}..}|...retur|
|00004290| 6e 20 28 73 74 61 74 75 | 73 29 3b 0d 7d 0d 0d 0d |n (statu|s);.}...|
|000042a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000042b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000042c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000042d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000042e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000042f0| 0d 2f 2f 0d 2f 2f 20 53 | 42 50 48 61 6e 64 6c 65 |.//.// S|BPHandle|
|00004300| 44 65 76 69 63 65 52 65 | 6d 6f 76 65 64 0d 2f 2f |DeviceRe|moved.//|
|00004310| 0d 2f 2f 20 20 20 54 68 | 69 73 20 72 6f 75 74 69 |.// Th|is routi|
|00004320| 6e 65 20 68 61 6e 64 6c | 65 73 20 64 65 76 69 63 |ne handl|es devic|
|00004330| 65 73 20 62 65 69 6e 67 | 20 72 65 6d 6f 76 65 64 |es being| removed|
|00004340| 2e 0d 2f 2f 0d 0d 73 74 | 61 74 69 63 20 4f 53 53 |..//..st|atic OSS|
|00004350| 74 61 74 75 73 09 53 42 | 50 48 61 6e 64 6c 65 44 |tatus.SB|PHandleD|
|00004360| 65 76 69 63 65 52 65 6d | 6f 76 65 64 28 0d 09 47 |eviceRem|oved(..G|
|00004370| 44 46 44 65 76 69 63 65 | 45 76 65 6e 74 44 61 74 |DFDevice|EventDat|
|00004380| 61 50 74 72 09 09 70 47 | 44 46 44 65 76 69 63 65 |aPtr..pG|DFDevice|
|00004390| 45 76 65 6e 74 44 61 74 | 61 29 0d 7b 0d 09 52 65 |EventDat|a).{..Re|
|000043a0| 67 45 6e 74 72 79 49 44 | 50 74 72 09 09 09 09 70 |gEntryID|Ptr....p|
|000043b0| 52 65 67 45 6e 74 72 79 | 49 44 3b 0d 09 53 42 50 |RegEntry|ID;..SBP|
|000043c0| 44 72 69 76 65 72 49 44 | 09 09 09 09 09 73 62 70 |DriverID|.....sbp|
|000043d0| 44 72 69 76 65 72 49 44 | 3b 0d 09 53 42 50 44 72 |DriverID|;..SBPDr|
|000043e0| 69 76 65 72 44 61 74 61 | 50 74 72 09 09 09 70 53 |iverData|Ptr...pS|
|000043f0| 42 50 44 72 69 76 65 72 | 44 61 74 61 3b 0d 09 53 |BPDriver|Data;..S|
|00004400| 42 50 43 6c 69 65 6e 74 | 44 61 74 61 50 74 72 09 |BPClient|DataPtr.|
|00004410| 09 09 70 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |..pSBPCl|ientData|
|00004420| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 09 09 09 09 09 09 |;..Boole|an......|
|00004430| 66 6f 75 6e 64 3b 0d 09 | 4f 53 53 74 61 74 75 73 |found;..|OSStatus|
|00004440| 09 09 09 09 09 73 74 61 | 74 75 73 20 3d 20 6e 6f |.....sta|tus = no|
|00004450| 45 72 72 2c 0d 09 09 09 | 09 09 09 09 09 63 6c 69 |Err,....|.....cli|
|00004460| 65 6e 74 53 74 61 74 75 | 73 3b 0d 0d 09 2f 2f 20 |entStatu|s;...// |
|00004470| 47 65 74 20 4e 61 6d 65 | 20 52 65 67 69 73 74 72 |Get Name| Registr|
|00004480| 79 20 65 6e 74 72 79 2e | 0d 09 70 52 65 67 45 6e |y entry.|..pRegEn|
|00004490| 74 72 79 49 44 20 3d 20 | 26 28 70 47 44 46 44 65 |tryID = |&(pGDFDe|
|000044a0| 76 69 63 65 45 76 65 6e | 74 44 61 74 61 2d 3e 64 |viceEven|tData->d|
|000044b0| 65 76 69 63 65 52 65 67 | 45 6e 74 72 79 49 44 29 |eviceReg|EntryID)|
|000044c0| 3b 0d 0d 09 2f 2f 20 46 | 69 6e 64 20 64 72 69 76 |;...// F|ind driv|
|000044d0| 65 72 20 74 68 61 74 20 | 69 73 20 62 65 69 6e 67 |er that |is being|
|000044e0| 20 72 65 6d 6f 76 65 64 | 2e 0d 09 73 62 70 44 72 | removed|...sbpDr|
|000044f0| 69 76 65 72 49 44 20 3d | 20 53 42 50 46 69 6e 64 |iverID =| SBPFind|
|00004500| 44 72 69 76 65 72 20 28 | 70 52 65 67 45 6e 74 72 |Driver (|pRegEntr|
|00004510| 79 49 44 29 3b 0d 09 69 | 66 20 28 73 62 70 44 72 |yID);..i|f (sbpDr|
|00004520| 69 76 65 72 49 44 20 21 | 3d 20 6b 49 6e 76 61 6c |iverID !|= kInval|
|00004530| 69 64 53 42 50 44 72 69 | 76 65 72 49 44 29 0d 09 |idSBPDri|verID)..|
|00004540| 7b 0d 09 09 70 53 42 50 | 44 72 69 76 65 72 44 61 |{...pSBP|DriverDa|
|00004550| 74 61 20 3d 20 28 53 42 | 50 44 72 69 76 65 72 44 |ta = (SB|PDriverD|
|00004560| 61 74 61 50 74 72 29 20 | 73 62 70 44 72 69 76 65 |ataPtr) |sbpDrive|
|00004570| 72 49 44 3b 0d 09 09 66 | 6f 75 6e 64 20 3d 20 74 |rID;...f|ound = t|
|00004580| 72 75 65 3b 0d 09 7d 0d | 09 65 6c 73 65 0d 09 7b |rue;..}.|.else..{|
|00004590| 0d 09 09 66 6f 75 6e 64 | 20 3d 20 66 61 6c 73 65 |...found| = false|
|000045a0| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 49 66 20 64 72 69 |;..}.../|/ If dri|
|000045b0| 76 65 72 20 77 61 73 20 | 66 6f 75 6e 64 2c 20 73 |ver was |found, s|
|000045c0| 65 74 20 69 74 20 64 69 | 73 63 6f 6e 6e 65 63 74 |et it di|sconnect|
|000045d0| 65 64 2e 0d 09 69 66 20 | 28 66 6f 75 6e 64 29 0d |ed...if |(found).|
|000045e0| 09 09 70 53 42 50 44 72 | 69 76 65 72 44 61 74 61 |..pSBPDr|iverData|
|000045f0| 2d 3e 64 65 76 69 63 65 | 44 69 73 63 6f 6e 6e 65 |->device|Disconne|
|00004600| 63 74 65 64 20 3d 20 74 | 72 75 65 3b 0d 0d 09 2f |cted = t|rue;.../|
|00004610| 2f 20 44 69 73 70 6f 73 | 65 20 64 72 69 76 65 72 |/ Dispos|e driver|
|00004620| 20 69 66 20 6e 6f 20 6f | 6e 65 20 68 61 73 20 69 | if no o|ne has i|
|00004630| 74 20 6f 70 65 6e 2e 0d | 09 2f 2f 20 4f 74 68 65 |t open..|.// Othe|
|00004640| 72 77 69 73 65 2c 20 73 | 65 6e 64 20 75 70 20 6e |rwise, s|end up n|
|00004650| 6f 74 69 66 69 63 61 74 | 69 6f 6e 20 74 6f 20 61 |otificat|ion to a|
|00004660| 6c 6c 20 63 6c 69 65 6e | 74 73 2e 0d 09 69 66 20 |ll clien|ts...if |
|00004670| 28 66 6f 75 6e 64 29 0d | 09 7b 0d 09 09 69 66 20 |(found).|.{...if |
|00004680| 28 70 53 42 50 44 72 69 | 76 65 72 44 61 74 61 2d |(pSBPDri|verData-|
|00004690| 3e 6e 75 6d 43 6f 6e 6e | 65 63 74 69 6f 6e 73 20 |>numConn|ections |
|000046a0| 3d 3d 20 30 29 0d 09 09 | 7b 0d 09 09 09 44 69 73 |== 0)...|{....Dis|
|000046b0| 70 6f 73 65 53 42 50 44 | 72 69 76 65 72 20 28 28 |poseSBPD|river ((|
|000046c0| 53 42 50 44 72 69 76 65 | 72 49 44 29 20 70 53 42 |SBPDrive|rID) pSB|
|000046d0| 50 44 72 69 76 65 72 44 | 61 74 61 29 3b 0d 09 09 |PDriverD|ata);...|
|000046e0| 7d 0d 09 09 65 6c 73 65 | 0d 09 09 7b 0d 09 09 09 |}...else|...{....|
|000046f0| 70 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 20 3d |pSBPClie|ntData =|
|00004700| 20 67 70 53 42 50 46 61 | 6d 69 6c 79 44 61 74 61 | gpSBPFa|milyData|
|00004710| 2d 3e 70 53 42 50 43 6c | 69 65 6e 74 4c 69 73 74 |->pSBPCl|ientList|
|00004720| 3b 0d 09 09 09 77 68 69 | 6c 65 20 28 70 53 42 50 |;....whi|le (pSBP|
|00004730| 43 6c 69 65 6e 74 44 61 | 74 61 20 21 3d 20 6e 69 |ClientDa|ta != ni|
|00004740| 6c 29 0d 09 09 09 7b 0d | 09 09 09 09 2f 2f 20 41 |l)....{.|....// A|
|00004750| 64 64 20 74 68 65 20 64 | 72 69 76 65 72 20 49 44 |dd the d|river ID|
|00004760| 20 70 61 72 61 6d 65 74 | 65 72 20 74 6f 20 65 76 | paramet|er to ev|
|00004770| 65 6e 74 2e 0d 09 09 09 | 09 63 6c 69 65 6e 74 53 |ent.....|.clientS|
|00004780| 74 61 74 75 73 20 3d 20 | 41 45 50 75 74 50 61 72 |tatus = |AEPutPar|
|00004790| 61 6d 50 74 72 0d 09 09 | 09 09 09 09 09 09 28 26 |amPtr...|......(&|
|000047a0| 28 70 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 2d |(pSBPCli|entData-|
|000047b0| 3e 64 65 76 69 63 65 52 | 65 6d 6f 76 65 64 41 70 |>deviceR|emovedAp|
|000047c0| 70 6c 65 45 76 65 6e 74 | 29 2c 0d 09 09 09 09 09 |pleEvent|),......|
|000047d0| 09 09 09 20 6b 41 45 53 | 42 50 44 72 69 76 65 72 |... kAES|BPDriver|
|000047e0| 49 44 4b 65 79 2c 0d 09 | 09 09 09 09 09 09 09 20 |IDKey,..|....... |
|000047f0| 6b 41 45 53 42 50 44 72 | 69 76 65 72 49 44 54 79 |kAESBPDr|iverIDTy|
|00004800| 70 65 2c 0d 09 09 09 09 | 09 09 09 09 20 26 73 62 |pe,.....|.... &sb|
|00004810| 70 44 72 69 76 65 72 49 | 44 2c 0d 09 09 09 09 09 |pDriverI|D,......|
|00004820| 09 09 09 20 73 69 7a 65 | 6f 66 20 28 53 42 50 44 |... size|of (SBPD|
|00004830| 72 69 76 65 72 49 44 29 | 29 3b 0d 0d 09 09 09 09 |riverID)|);......|
|00004840| 2f 2f 20 53 65 6e 64 20 | 65 76 65 6e 74 2e 0d 09 |// Send |event...|
|00004850| 09 09 09 69 66 20 28 63 | 6c 69 65 6e 74 53 74 61 |...if (c|lientSta|
|00004860| 74 75 73 20 3d 3d 20 6e | 6f 45 72 72 29 0d 09 09 |tus == n|oErr)...|
|00004870| 09 09 7b 0d 09 09 09 09 | 09 63 6c 69 65 6e 74 53 |..{.....|.clientS|
|00004880| 74 61 74 75 73 20 3d 20 | 53 42 50 53 65 6e 64 43 |tatus = |SBPSendC|
|00004890| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 0d |lientApp|leEvent.|
|000048a0| 09 09 09 09 09 09 09 09 | 09 28 70 53 42 50 43 6c |........|.(pSBPCl|
|000048b0| 69 65 6e 74 44 61 74 61 | 2c 0d 09 09 09 09 09 09 |ientData|,.......|
|000048c0| 09 09 09 20 26 28 70 53 | 42 50 43 6c 69 65 6e 74 |... &(pS|BPClient|
|000048d0| 44 61 74 61 2d 3e 64 65 | 76 69 63 65 52 65 6d 6f |Data->de|viceRemo|
|000048e0| 76 65 64 41 70 70 6c 65 | 45 76 65 6e 74 29 2c 0d |vedApple|Event),.|
|000048f0| 09 09 09 09 09 09 09 09 | 09 20 30 2c 0d 09 09 09 |........|. 0,....|
|00004900| 09 09 09 09 09 09 20 6b | 41 45 4e 6f 72 6d 61 6c |...... k|AENormal|
|00004910| 50 72 69 6f 72 69 74 79 | 2c 0d 09 09 09 09 09 09 |Priority|,.......|
|00004920| 09 09 09 20 30 2c 0d 09 | 09 09 09 09 09 09 09 09 |... 0,..|........|
|00004930| 20 6e 69 6c 2c 0d 09 09 | 09 09 09 09 09 09 09 20 | nil,...|....... |
|00004940| 6e 69 6c 29 3b 0d 09 09 | 09 09 7d 0d 0d 09 09 09 |nil);...|..}.....|
|00004950| 09 70 53 42 50 43 6c 69 | 65 6e 74 44 61 74 61 20 |.pSBPCli|entData |
|00004960| 3d 20 70 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 |= pSBPCl|ientData|
|00004970| 2d 3e 70 4e 65 78 74 53 | 42 50 43 6c 69 65 6e 74 |->pNextS|BPClient|
|00004980| 44 61 74 61 3b 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |Data;...|.}...}..|
|00004990| 7d 0d 0d 09 72 65 74 75 | 72 6e 20 28 73 74 61 74 |}...retu|rn (stat|
|000049a0| 75 73 29 3b 0d 7d 0d 0d | 0d 2f 2f 2f 2f 2f 2f 2f |us);.}..|.///////|
|000049b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000049c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000049d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000049e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000049f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 0d 2f 2f 0d 2f 2f 20 |////////|/.//.// |
|00004a00| 53 42 50 53 65 6e 64 43 | 6c 69 65 6e 74 41 70 70 |SBPSendC|lientApp|
|00004a10| 6c 65 45 76 65 6e 74 0d | 2f 2f 0d 2f 2f 20 20 20 |leEvent.|//.// |
|00004a20| 54 68 69 73 20 72 6f 75 | 74 69 6e 65 20 71 75 65 |This rou|tine que|
|00004a30| 75 65 73 20 61 6e 20 41 | 70 70 6c 65 20 45 76 65 |ues an A|pple Eve|
|00004a40| 6e 74 20 74 6f 20 62 65 | 20 73 65 6e 74 20 74 6f |nt to be| sent to|
|00004a50| 20 61 20 63 6c 69 65 6e | 74 20 66 6f 72 20 64 65 | a clien|t for de|
|00004a60| 76 69 63 65 0d 2f 2f 20 | 6e 6f 74 69 66 69 63 61 |vice.// |notifica|
|00004a70| 74 69 6f 6e 2e 0d 2f 2f | 0d 0d 73 74 61 74 69 63 |tion..//|..static|
|00004a80| 20 4f 53 45 72 72 09 53 | 42 50 53 65 6e 64 43 6c | OSErr.S|BPSendCl|
|00004a90| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 28 0d |ientAppl|eEvent(.|
|00004aa0| 09 53 42 50 43 6c 69 65 | 6e 74 44 61 74 61 50 74 |.SBPClie|ntDataPt|
|00004ab0| 72 09 09 09 70 53 42 50 | 43 6c 69 65 6e 74 44 61 |r...pSBP|ClientDa|
|00004ac0| 74 61 2c 0d 09 63 6f 6e | 73 74 20 41 70 70 6c 65 |ta,..con|st Apple|
|00004ad0| 45 76 65 6e 74 09 09 09 | 2a 74 68 65 41 70 70 6c |Event...|*theAppl|
|00004ae0| 65 45 76 65 6e 74 2c 0d | 09 41 45 53 65 6e 64 4d |eEvent,.|.AESendM|
|00004af0| 6f 64 65 09 09 09 09 09 | 73 65 6e 64 4d 6f 64 65 |ode.....|sendMode|
|00004b00| 2c 0d 09 41 45 53 65 6e | 64 50 72 69 6f 72 69 74 |,..AESen|dPriorit|
|00004b10| 79 09 09 09 09 73 65 6e | 64 50 72 69 6f 72 69 74 |y....sen|dPriorit|
|00004b20| 79 2c 0d 09 6c 6f 6e 67 | 09 09 09 09 09 09 74 69 |y,..long|......ti|
|00004b30| 6d 65 4f 75 74 49 6e 54 | 69 63 6b 73 2c 0d 09 41 |meOutInT|icks,..A|
|00004b40| 45 49 64 6c 65 55 50 50 | 09 09 09 09 09 69 64 6c |EIdleUPP|.....idl|
|00004b50| 65 50 72 6f 63 2c 0d 09 | 41 45 46 69 6c 74 65 72 |eProc,..|AEFilter|
|00004b60| 55 50 50 09 09 09 09 09 | 66 69 6c 74 65 72 50 72 |UPP.....|filterPr|
|00004b70| 6f 63 29 0d 7b 0d 09 43 | 6c 69 65 6e 74 41 70 70 |oc).{..C|lientApp|
|00004b80| 6c 65 45 76 65 6e 74 44 | 61 74 61 50 74 72 09 09 |leEventD|ataPtr..|
|00004b90| 70 43 6c 69 65 6e 74 41 | 70 70 6c 65 45 76 65 6e |pClientA|ppleEven|
|00004ba0| 74 44 61 74 61 20 3d 20 | 6e 69 6c 3b 09 0d 09 4f |tData = |nil;...O|
|00004bb0| 53 45 72 72 09 09 09 09 | 09 09 65 72 72 20 3d 20 |SErr....|..err = |
|00004bc0| 6e 6f 45 72 72 3b 0d 0d | 09 2f 2f 20 43 72 65 61 |noErr;..|.// Crea|
|00004bd0| 74 65 20 64 61 74 61 20 | 66 6f 72 20 74 68 65 20 |te data |for the |
|00004be0| 63 6c 69 65 6e 74 20 41 | 70 70 6c 65 20 45 76 65 |client A|pple Eve|
|00004bf0| 6e 74 2e 0d 09 70 43 6c | 69 65 6e 74 41 70 70 6c |nt...pCl|ientAppl|
|00004c00| 65 45 76 65 6e 74 44 61 | 74 61 20 3d 20 28 43 6c |eEventDa|ta = (Cl|
|00004c10| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 44 61 |ientAppl|eEventDa|
|00004c20| 74 61 50 74 72 29 0d 09 | 09 50 6f 6f 6c 41 6c 6c |taPtr)..|.PoolAll|
|00004c30| 6f 63 61 74 65 52 65 73 | 69 64 65 6e 74 20 28 73 |ocateRes|ident (s|
|00004c40| 69 7a 65 6f 66 20 28 43 | 6c 69 65 6e 74 41 70 70 |izeof (C|lientApp|
|00004c50| 6c 65 45 76 65 6e 74 44 | 61 74 61 29 2c 20 74 72 |leEventD|ata), tr|
|00004c60| 75 65 29 3b 0d 09 69 66 | 20 28 70 43 6c 69 65 6e |ue);..if| (pClien|
|00004c70| 74 41 70 70 6c 65 45 76 | 65 6e 74 44 61 74 61 20 |tAppleEv|entData |
|00004c80| 21 3d 20 6e 69 6c 29 0d | 09 7b 0d 09 09 70 43 6c |!= nil).|.{...pCl|
|00004c90| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 44 61 |ientAppl|eEventDa|
|00004ca0| 74 61 2d 3e 73 65 6e 64 | 4d 6f 64 65 20 3d 0d 09 |ta->send|Mode =..|
|00004cb0| 09 09 28 73 65 6e 64 4d | 6f 64 65 20 26 20 7e 28 |..(sendM|ode & ~(|
|00004cc0| 6b 41 45 4e 6f 52 65 70 | 6c 79 20 7c 20 6b 41 45 |kAENoRep|ly | kAE|
|00004cd0| 51 75 65 75 65 52 65 70 | 6c 79 20 7c 20 6b 41 45 |QueueRep|ly | kAE|
|00004ce0| 57 61 69 74 52 65 70 6c | 79 29 29 20 7c 20 6b 41 |WaitRepl|y)) | kA|
|00004cf0| 45 4e 6f 52 65 70 6c 79 | 3b 0d 09 09 70 43 6c 69 |ENoReply|;...pCli|
|00004d00| 65 6e 74 41 70 70 6c 65 | 45 76 65 6e 74 44 61 74 |entApple|EventDat|
|00004d10| 61 2d 3e 73 65 6e 64 50 | 72 69 6f 72 69 74 79 20 |a->sendP|riority |
|00004d20| 3d 20 73 65 6e 64 50 72 | 69 6f 72 69 74 79 3b 0d |= sendPr|iority;.|
|00004d30| 09 09 70 43 6c 69 65 6e | 74 41 70 70 6c 65 45 76 |..pClien|tAppleEv|
|00004d40| 65 6e 74 44 61 74 61 2d | 3e 74 69 6d 65 4f 75 74 |entData-|>timeOut|
|00004d50| 49 6e 54 69 63 6b 73 20 | 3d 20 74 69 6d 65 4f 75 |InTicks |= timeOu|
|00004d60| 74 49 6e 54 69 63 6b 73 | 3b 0d 09 09 70 43 6c 69 |tInTicks|;...pCli|
|00004d70| 65 6e 74 41 70 70 6c 65 | 45 76 65 6e 74 44 61 74 |entApple|EventDat|
|00004d80| 61 2d 3e 69 64 6c 65 50 | 72 6f 63 20 3d 20 69 64 |a->idleP|roc = id|
|00004d90| 6c 65 50 72 6f 63 3b 0d | 09 09 70 43 6c 69 65 6e |leProc;.|..pClien|
|00004da0| 74 41 70 70 6c 65 45 76 | 65 6e 74 44 61 74 61 2d |tAppleEv|entData-|
|00004db0| 3e 66 69 6c 74 65 72 50 | 72 6f 63 20 3d 20 66 69 |>filterP|roc = fi|
|00004dc0| 6c 74 65 72 50 72 6f 63 | 3b 0d 09 7d 0d 09 65 6c |lterProc|;..}..el|
|00004dd0| 73 65 0d 09 7b 0d 09 09 | 65 72 72 20 3d 20 6d 65 |se..{...|err = me|
|00004de0| 6d 46 75 6c 6c 45 72 72 | 3b 0d 09 7d 0d 0d 09 2f |mFullErr|;..}.../|
|00004df0| 2f 20 43 6f 70 79 20 74 | 68 65 20 67 69 76 65 6e |/ Copy t|he given|
|00004e00| 20 41 70 70 6c 65 20 45 | 76 65 6e 74 2e 0d 09 69 | Apple E|vent...i|
|00004e10| 66 20 28 65 72 72 20 3d | 3d 20 6e 6f 45 72 72 29 |f (err =|= noErr)|
|00004e20| 0d 09 7b 0d 09 09 65 72 | 72 20 3d 20 41 45 44 75 |..{...er|r = AEDu|
|00004e30| 70 6c 69 63 61 74 65 44 | 65 73 63 20 28 74 68 65 |plicateD|esc (the|
|00004e40| 41 70 70 6c 65 45 76 65 | 6e 74 2c 0d 09 09 09 09 |AppleEve|nt,.....|
|00004e50| 09 09 09 20 20 20 26 28 | 70 43 6c 69 65 6e 74 41 |... &(|pClientA|
|00004e60| 70 70 6c 65 45 76 65 6e | 74 44 61 74 61 2d 3e 63 |ppleEven|tData->c|
|00004e70| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 29 |lientApp|leEvent)|
|00004e80| 29 3b 0d 09 09 69 66 20 | 28 65 72 72 20 3d 3d 20 |);...if |(err == |
|00004e90| 6e 6f 45 72 72 29 0d 09 | 09 09 70 43 6c 69 65 6e |noErr)..|..pClien|
|00004ea0| 74 41 70 70 6c 65 45 76 | 65 6e 74 44 61 74 61 2d |tAppleEv|entData-|
|00004eb0| 3e 63 6c 69 65 6e 74 41 | 70 70 6c 65 45 76 65 6e |>clientA|ppleEven|
|00004ec0| 74 56 61 6c 69 64 20 3d | 20 74 72 75 65 3b 0d 09 |tValid =| true;..|
|00004ed0| 7d 0d 0d 09 2f 2f 20 51 | 75 65 75 65 20 74 68 65 |}...// Q|ueue the|
|00004ee0| 20 63 6c 69 65 6e 74 20 | 41 70 70 6c 65 20 45 76 | client |Apple Ev|
|00004ef0| 65 6e 74 20 74 6f 20 62 | 65 20 73 65 6e 74 20 61 |ent to b|e sent a|
|00004f00| 74 20 61 20 67 6f 6f 64 | 20 74 69 6d 65 2e 0d 09 |t a good| time...|
|00004f10| 69 66 20 28 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 |if (err |== noErr|
|00004f20| 29 0d 09 7b 0d 09 09 65 | 72 72 20 3d 20 50 42 45 |)..{...e|rr = PBE|
|00004f30| 6e 71 75 65 75 65 4c 61 | 73 74 20 28 28 51 45 6c |nqueueLa|st ((QEl|
|00004f40| 65 6d 50 74 72 29 20 70 | 43 6c 69 65 6e 74 41 70 |emPtr) p|ClientAp|
|00004f50| 70 6c 65 45 76 65 6e 74 | 44 61 74 61 2c 0d 09 09 |pleEvent|Data,...|
|00004f60| 09 09 09 09 09 20 70 53 | 42 50 43 6c 69 65 6e 74 |..... pS|BPClient|
|00004f70| 44 61 74 61 2d 3e 63 6c | 69 65 6e 74 41 70 70 6c |Data->cl|ientAppl|
|00004f80| 65 45 76 65 6e 74 51 75 | 65 75 65 29 3b 0d 09 7d |eEventQu|eue);..}|
|00004f90| 0d 0d 09 2f 2f 20 43 6c | 65 61 6e 20 75 70 20 6f |...// Cl|ean up o|
|00004fa0| 6e 20 65 72 72 6f 72 2e | 0d 09 69 66 20 28 65 72 |n error.|..if (er|
|00004fb0| 72 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 44 69 |r != noE|rr)...Di|
|00004fc0| 73 70 6f 73 65 43 6c 69 | 65 6e 74 41 70 70 6c 65 |sposeCli|entApple|
|00004fd0| 45 76 65 6e 74 44 61 74 | 61 20 28 70 43 6c 69 65 |EventDat|a (pClie|
|00004fe0| 6e 74 41 70 70 6c 65 45 | 76 65 6e 74 44 61 74 61 |ntAppleE|ventData|
|00004ff0| 29 3b 0d 0d 09 72 65 74 | 75 72 6e 20 28 65 72 72 |);...ret|urn (err|
|00005000| 29 3b 0d 7d 0d 0d 0d 2f | 2f 2f 2f 2f 2f 2f 2f 2f |);.}.../|////////|
|00005010| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005020| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005030| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005040| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005050| 2f 2f 2f 2f 2f 2f 2f 0d | 2f 2f 0d 2f 2f 20 44 69 |///////.|//.// Di|
|00005060| 73 70 6f 73 65 43 6c 69 | 65 6e 74 41 70 70 6c 65 |sposeCli|entApple|
|00005070| 45 76 65 6e 74 44 61 74 | 61 0d 2f 2f 0d 2f 2f 20 |EventDat|a.//.// |
|00005080| 20 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 64 | This r|outine d|
|00005090| 69 73 70 6f 73 65 73 20 | 6f 66 20 74 68 65 20 63 |isposes |of the c|
|000050a0| 6c 69 65 6e 74 20 41 70 | 70 6c 65 20 45 76 65 6e |lient Ap|ple Even|
|000050b0| 74 20 72 65 63 6f 72 64 | 2e 0d 2f 2f 0d 0d 73 74 |t record|..//..st|
|000050c0| 61 74 69 63 20 76 6f 69 | 64 09 44 69 73 70 6f 73 |atic voi|d.Dispos|
|000050d0| 65 43 6c 69 65 6e 74 41 | 70 70 6c 65 45 76 65 6e |eClientA|ppleEven|
|000050e0| 74 44 61 74 61 28 0d 09 | 43 6c 69 65 6e 74 41 70 |tData(..|ClientAp|
|000050f0| 70 6c 65 45 76 65 6e 74 | 44 61 74 61 50 74 72 09 |pleEvent|DataPtr.|
|00005100| 09 70 43 6c 69 65 6e 74 | 41 70 70 6c 65 45 76 65 |.pClient|AppleEve|
|00005110| 6e 74 44 61 74 61 29 0d | 7b 0d 09 69 66 20 28 70 |ntData).|{..if (p|
|00005120| 43 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |ClientAp|pleEvent|
|00005130| 44 61 74 61 20 21 3d 20 | 6e 69 6c 29 0d 09 7b 0d |Data != |nil)..{.|
|00005140| 09 09 2f 2f 20 44 69 73 | 70 6f 73 65 20 6f 66 20 |..// Dis|pose of |
|00005150| 41 70 70 6c 65 20 45 76 | 65 6e 74 20 63 6f 70 79 |Apple Ev|ent copy|
|00005160| 2e 0d 09 09 69 66 20 28 | 70 43 6c 69 65 6e 74 41 |....if (|pClientA|
|00005170| 70 70 6c 65 45 76 65 6e | 74 44 61 74 61 2d 3e 63 |ppleEven|tData->c|
|00005180| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 56 |lientApp|leEventV|
|00005190| 61 6c 69 64 29 0d 09 09 | 09 41 45 44 69 73 70 6f |alid)...|.AEDispo|
|000051a0| 73 65 44 65 73 63 20 28 | 26 28 70 43 6c 69 65 6e |seDesc (|&(pClien|
|000051b0| 74 41 70 70 6c 65 45 76 | 65 6e 74 44 61 74 61 2d |tAppleEv|entData-|
|000051c0| 3e 63 6c 69 65 6e 74 41 | 70 70 6c 65 45 76 65 6e |>clientA|ppleEven|
|000051d0| 74 29 29 3b 0d 0d 09 09 | 2f 2f 20 44 69 73 70 6f |t));....|// Dispo|
|000051e0| 73 65 20 6f 66 20 63 6c | 69 65 6e 74 20 41 70 70 |se of cl|ient App|
|000051f0| 6c 65 20 45 76 65 6e 74 | 20 64 61 74 61 20 72 65 |le Event| data re|
|00005200| 63 6f 72 64 2e 0d 09 09 | 50 6f 6f 6c 44 65 61 6c |cord....|PoolDeal|
|00005210| 6c 6f 63 61 74 65 20 28 | 28 50 74 72 29 20 70 43 |locate (|(Ptr) pC|
|00005220| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 44 |lientApp|leEventD|
|00005230| 61 74 61 29 3b 0d 09 7d | 0d 7d 0d 0d 0d 2f 2f 2f |ata);..}|.}...///|
|00005240| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005250| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005260| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005270| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005280| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 0d 2f 2f |////////|/////.//|
|00005290| 0d 2f 2f 20 53 42 50 43 | 72 65 61 74 65 43 6c 69 |.// SBPC|reateCli|
|000052a0| 65 6e 74 41 70 70 6c 65 | 45 76 65 6e 74 51 75 65 |entApple|EventQue|
|000052b0| 75 65 0d 2f 2f 0d 2f 2f | 20 20 20 54 68 69 73 20 |ue.//.//| This |
|000052c0| 72 6f 75 74 69 6e 65 20 | 63 72 65 61 74 65 73 20 |routine |creates |
|000052d0| 61 20 63 6c 69 65 6e 74 | 20 41 70 70 6c 65 45 76 |a client| AppleEv|
|000052e0| 65 6e 74 20 71 75 65 75 | 65 2e 0d 2f 2f 0d 0d 73 |ent queu|e..//..s|
|000052f0| 74 61 74 69 63 20 4f 53 | 53 74 61 74 75 73 09 53 |tatic OS|Status.S|
|00005300| 42 50 43 72 65 61 74 65 | 43 6c 69 65 6e 74 41 70 |BPCreate|ClientAp|
|00005310| 70 6c 65 45 76 65 6e 74 | 51 75 65 75 65 28 0d 09 |pleEvent|Queue(..|
|00005320| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 50 74 72 |SBPClien|tDataPtr|
|00005330| 09 09 09 70 53 42 50 43 | 6c 69 65 6e 74 44 61 74 |...pSBPC|lientDat|
|00005340| 61 29 0d 7b 0d 09 4f 53 | 53 74 61 74 75 73 09 09 |a).{..OS|Status..|
|00005350| 09 09 09 73 74 61 74 75 | 73 20 3d 20 6e 6f 45 72 |...statu|s = noEr|
|00005360| 72 3b 0d 0d 09 73 74 61 | 74 75 73 20 3d 20 50 42 |r;...sta|tus = PB|
|00005370| 51 75 65 75 65 43 72 65 | 61 74 65 20 28 26 28 70 |QueueCre|ate (&(p|
|00005380| 53 42 50 43 6c 69 65 6e | 74 44 61 74 61 2d 3e 63 |SBPClien|tData->c|
|00005390| 6c 69 65 6e 74 41 70 70 | 6c 65 45 76 65 6e 74 51 |lientApp|leEventQ|
|000053a0| 75 65 75 65 29 29 3b 0d | 0d 09 72 65 74 75 72 6e |ueue));.|..return|
|000053b0| 20 28 73 74 61 74 75 73 | 29 3b 0d 7d 0d 0d 0d 2f | (status|);.}.../|
|000053c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000053d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000053e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000053f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005400| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 0d |////////|///////.|
|00005410| 2f 2f 0d 2f 2f 20 53 42 | 50 44 69 73 70 6f 73 65 |//.// SB|PDispose|
|00005420| 43 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |ClientAp|pleEvent|
|00005430| 51 75 65 75 65 0d 2f 2f | 0d 2f 2f 20 20 20 54 68 |Queue.//|.// Th|
|00005440| 69 73 20 72 6f 75 74 69 | 6e 65 20 64 69 73 70 6f |is routi|ne dispo|
|00005450| 73 65 73 20 6f 66 20 61 | 20 63 6c 69 65 6e 74 20 |ses of a| client |
|00005460| 41 70 70 6c 65 45 76 65 | 6e 74 20 71 75 65 75 65 |AppleEve|nt queue|
|00005470| 2e 0d 2f 2f 0d 0d 73 74 | 61 74 69 63 20 4f 53 53 |..//..st|atic OSS|
|00005480| 74 61 74 75 73 09 53 42 | 50 44 69 73 70 6f 73 65 |tatus.SB|PDispose|
|00005490| 43 6c 69 65 6e 74 41 70 | 70 6c 65 45 76 65 6e 74 |ClientAp|pleEvent|
|000054a0| 51 75 65 75 65 28 0d 09 | 53 42 50 43 6c 69 65 6e |Queue(..|SBPClien|
|000054b0| 74 44 61 74 61 50 74 72 | 09 09 09 70 53 42 50 43 |tDataPtr|...pSBPC|
|000054c0| 6c 69 65 6e 74 44 61 74 | 61 29 0d 7b 0d 09 43 6c |lientDat|a).{..Cl|
|000054d0| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 44 61 |ientAppl|eEventDa|
|000054e0| 74 61 50 74 72 09 09 70 | 43 6c 69 65 6e 74 41 70 |taPtr..p|ClientAp|
|000054f0| 70 6c 65 45 76 65 6e 74 | 44 61 74 61 3b 0d 09 4f |pleEvent|Data;..O|
|00005500| 53 53 74 61 74 75 73 09 | 09 09 09 09 73 74 61 74 |SStatus.|....stat|
|00005510| 75 73 20 3d 20 6e 6f 45 | 72 72 3b 0d 0d 09 69 66 |us = noE|rr;...if|
|00005520| 20 28 70 53 42 50 43 6c | 69 65 6e 74 44 61 74 61 | (pSBPCl|ientData|
|00005530| 2d 3e 63 6c 69 65 6e 74 | 41 70 70 6c 65 45 76 65 |->client|AppleEve|
|00005540| 6e 74 51 75 65 75 65 20 | 21 3d 20 6e 69 6c 29 0d |ntQueue |!= nil).|
|00005550| 09 7b 0d 09 09 2f 2f 20 | 44 69 73 70 6f 73 65 20 |.{...// |Dispose |
|00005560| 6f 66 20 61 6e 79 20 63 | 6c 69 65 6e 74 20 41 70 |of any c|lient Ap|
|00005570| 70 6c 65 45 76 65 6e 74 | 73 20 73 74 69 6c 6c 20 |pleEvent|s still |
|00005580| 69 6e 20 71 75 65 75 65 | 2e 0d 09 09 77 68 69 6c |in queue|....whil|
|00005590| 65 20 28 73 74 61 74 75 | 73 20 3d 3d 20 6e 6f 45 |e (statu|s == noE|
|000055a0| 72 72 29 0d 09 09 7b 0d | 09 09 09 73 74 61 74 75 |rr)...{.|...statu|
|000055b0| 73 20 3d 20 50 42 44 65 | 71 75 65 75 65 46 69 72 |s = PBDe|queueFir|
|000055c0| 73 74 20 28 70 53 42 50 | 43 6c 69 65 6e 74 44 61 |st (pSBP|ClientDa|
|000055d0| 74 61 2d 3e 63 6c 69 65 | 6e 74 41 70 70 6c 65 45 |ta->clie|ntAppleE|
|000055e0| 76 65 6e 74 51 75 65 75 | 65 2c 0d 09 09 09 09 09 |ventQueu|e,......|
|000055f0| 09 09 09 09 20 28 51 45 | 6c 65 6d 50 74 72 20 2a |.... (QE|lemPtr *|
|00005600| 29 20 26 70 43 6c 69 65 | 6e 74 41 70 70 6c 65 45 |) &pClie|ntAppleE|
|00005610| 76 65 6e 74 44 61 74 61 | 29 3b 0d 09 09 09 69 66 |ventData|);....if|
|00005620| 20 28 73 74 61 74 75 73 | 20 3d 3d 20 6e 6f 45 72 | (status| == noEr|
|00005630| 72 29 0d 09 09 09 09 44 | 69 73 70 6f 73 65 43 6c |r).....D|isposeCl|
|00005640| 69 65 6e 74 41 70 70 6c | 65 45 76 65 6e 74 44 61 |ientAppl|eEventDa|
|00005650| 74 61 20 28 70 43 6c 69 | 65 6e 74 41 70 70 6c 65 |ta (pCli|entApple|
|00005660| 45 76 65 6e 74 44 61 74 | 61 29 3b 0d 09 09 7d 0d |EventDat|a);...}.|
|00005670| 0d 09 09 2f 2f 20 44 65 | 6c 65 74 65 20 71 75 65 |...// De|lete que|
|00005680| 75 65 2e 0d 09 09 50 42 | 51 75 65 75 65 44 65 6c |ue....PB|QueueDel|
|00005690| 65 74 65 20 28 70 53 42 | 50 43 6c 69 65 6e 74 44 |ete (pSB|PClientD|
|000056a0| 61 74 61 2d 3e 63 6c 69 | 65 6e 74 41 70 70 6c 65 |ata->cli|entApple|
|000056b0| 45 76 65 6e 74 51 75 65 | 75 65 29 3b 0d 09 7d 0d |EventQue|ue);..}.|
|000056c0| 0d 09 72 65 74 75 72 6e | 20 28 73 74 61 74 75 73 |..return| (status|
|000056d0| 29 3b 0d 7d 0d 0d 0d 2f | 2f 2f 2f 2f 2f 2f 2f 2f |);.}.../|////////|
|000056e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000056f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005700| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005710| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005720| 2f 2f 2f 2f 2f 2f 2f 0d | 2f 2f 0d 2f 2f 20 53 42 |///////.|//.// SB|
|00005730| 50 41 64 64 44 72 69 76 | 65 72 0d 2f 2f 0d 2f 2f |PAddDriv|er.//.//|
|00005740| 20 20 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | This |routine |
|00005750| 61 64 64 73 20 61 20 6e | 65 77 20 64 72 69 76 65 |adds a n|ew drive|
|00005760| 72 2e 0d 2f 2f 0d 0d 73 | 74 61 74 69 63 20 4f 53 |r..//..s|tatic OS|
|00005770| 53 74 61 74 75 73 09 53 | 42 50 41 64 64 44 72 69 |Status.S|BPAddDri|
|00005780| 76 65 72 28 0d 09 47 44 | 46 44 65 76 69 63 65 45 |ver(..GD|FDeviceE|
|00005790| 76 65 6e 74 44 61 74 61 | 50 74 72 09 09 70 47 44 |ventData|Ptr..pGD|
|000057a0| 46 44 65 76 69 63 65 45 | 76 65 6e 74 44 61 74 61 |FDeviceE|ventData|
|000057b0| 2c 0d 09 53 42 50 44 72 | 69 76 65 72 49 44 09 09 |,..SBPDr|iverID..|
|000057c0| 09 09 09 2a 70 53 42 50 | 44 72 69 76 65 72 49 44 |...*pSBP|DriverID|
|000057d0| 29 0d 7b 0d 09 52 65 67 | 45 6e 74 72 79 49 44 50 |).{..Reg|EntryIDP|
|000057e0| 74 72 09 09 09 09 70 52 | 65 67 45 6e 74 72 79 49 |tr....pR|egEntryI|
|000057f0| 44 3b 0d 09 53 42 50 44 | 72 69 76 65 72 49 44 09 |D;..SBPD|riverID.|
|00005800| 09 09 09 09 73 62 70 44 | 72 69 76 65 72 49 44 20 |....sbpD|riverID |
|00005810| 3d 20 6b 49 6e 76 61 6c | 69 64 53 42 50 44 72 69 |= kInval|idSBPDri|
|00005820| 76 65 72 49 44 3b 0d 09 | 53 42 50 44 72 69 76 65 |verID;..|SBPDrive|
|00005830| 72 44 61 74 61 50 74 72 | 09 09 09 70 53 42 50 44 |rDataPtr|...pSBPD|
|00005840| 72 69 76 65 72 44 61 74 | 61 3b 0d 0d 09 4f 53 53 |riverDat|a;...OSS|
|00005850| 74 61 74 75 73 09 09 09 | 09 09 73 74 61 74 75 73 |tatus...|..status|
|00005860| 20 3d 20 6e 6f 45 72 72 | 3b 0d 0d 09 2f 2f 20 47 | = noErr|;...// G|
|00005870| 65 74 20 4e 61 6d 65 20 | 52 65 67 69 73 74 72 79 |et Name |Registry|
|00005880| 20 65 6e 74 72 79 2e 0d | 09 70 52 65 67 45 6e 74 | entry..|.pRegEnt|
|00005890| 72 79 49 44 20 3d 20 26 | 28 70 47 44 46 44 65 76 |ryID = &|(pGDFDev|
|000058a0| 69 63 65 45 76 65 6e 74 | 44 61 74 61 2d 3e 64 65 |iceEvent|Data->de|
|000058b0| 76 69 63 65 52 65 67 45 | 6e 74 72 79 49 44 29 3b |viceRegE|ntryID);|
|000058c0| 0d 0d 09 2f 2f 20 41 64 | 64 20 64 72 69 76 65 72 |...// Ad|d driver|
|000058d0| 20 72 65 63 6f 72 64 20 | 74 6f 20 6c 69 73 74 2e | record |to list.|
|000058e0| 0d 09 69 66 20 28 73 74 | 61 74 75 73 20 3d 3d 20 |..if (st|atus == |
|000058f0| 6e 6f 45 72 72 29 0d 09 | 09 73 74 61 74 75 73 20 |noErr)..|.status |
|00005900| 3d 20 43 72 65 61 74 65 | 53 42 50 44 72 69 76 65 |= Create|SBPDrive|
|00005910| 72 49 44 20 28 26 73 62 | 70 44 72 69 76 65 72 49 |rID (&sb|pDriverI|
|00005920| 44 29 3b 0d 0d 09 2f 2f | 20 47 65 74 20 74 68 65 |D);...//| Get the|
|00005930| 20 64 72 69 76 65 72 20 | 64 61 74 61 20 66 72 6f | driver |data fro|
|00005940| 6d 20 74 68 65 20 49 44 | 2e 0d 09 69 66 20 28 73 |m the ID|...if (s|
|00005950| 74 61 74 75 73 20 3d 3d | 20 6e 6f 45 72 72 29 0d |tatus ==| noErr).|
|00005960| 09 09 70 53 42 50 44 72 | 69 76 65 72 44 61 74 61 |..pSBPDr|iverData|
|00005970| 20 3d 20 28 53 42 50 44 | 72 69 76 65 72 44 61 74 | = (SBPD|riverDat|
|00005980| 61 50 74 72 29 20 73 62 | 70 44 72 69 76 65 72 49 |aPtr) sb|pDriverI|
|00005990| 44 3b 0d 0d 09 2f 2f 20 | 46 69 6c 6c 20 69 6e 20 |D;...// |Fill in |
|000059a0| 64 72 69 76 65 72 20 64 | 61 74 61 20 72 65 63 6f |driver d|ata reco|
|000059b0| 72 64 2e 0d 09 69 66 20 | 28 73 74 61 74 75 73 20 |rd...if |(status |
|000059c0| 3d 3d 20 6e 6f 45 72 72 | 29 0d 09 7b 0d 09 09 70 |== noErr|)..{...p|
|000059d0| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 2d 3e 64 |SBPDrive|rData->d|
|000059e0| 65 76 69 63 65 52 65 67 | 69 73 74 72 79 49 44 20 |eviceReg|istryID |
|000059f0| 3d 20 2a 70 52 65 67 45 | 6e 74 72 79 49 44 3b 0d |= *pRegE|ntryID;.|
|00005a00| 09 09 70 53 42 50 44 72 | 69 76 65 72 44 61 74 61 |..pSBPDr|iverData|
|00005a10| 2d 3e 64 72 69 76 65 72 | 52 65 66 4e 75 6d 20 3d |->driver|RefNum =|
|00005a20| 20 70 47 44 46 44 65 76 | 69 63 65 45 76 65 6e 74 | pGDFDev|iceEvent|
|00005a30| 44 61 74 61 2d 3e 64 72 | 69 76 65 72 52 65 66 4e |Data->dr|iverRefN|
|00005a40| 75 6d 3b 0d 09 7d 0d 0d | 09 2f 2f 20 4f 70 65 6e |um;..}..|.// Open|
|00005a50| 20 64 72 69 76 65 72 2e | 0d 09 69 66 20 28 73 74 | driver.|..if (st|
|00005a60| 61 74 75 73 20 3d 3d 20 | 6e 6f 45 72 72 29 0d 09 |atus == |noErr)..|
|00005a70| 7b 0d 09 09 73 74 61 74 | 75 73 20 3d 20 4f 70 65 |{...stat|us = Ope|
|00005a80| 6e 49 6e 73 74 61 6c 6c | 65 64 44 72 69 76 65 72 |nInstall|edDriver|
|00005a90| 20 28 70 47 44 46 44 65 | 76 69 63 65 45 76 65 6e | (pGDFDe|viceEven|
|00005aa0| 74 44 61 74 61 2d 3e 64 | 72 69 76 65 72 52 65 66 |tData->d|riverRef|
|00005ab0| 4e 75 6d 2c 20 66 73 52 | 64 57 72 50 65 72 6d 29 |Num, fsR|dWrPerm)|
|00005ac0| 3b 0d 09 09 69 66 20 28 | 73 74 61 74 75 73 20 3d |;...if (|status =|
|00005ad0| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 09 70 53 42 50 |= noErr)|....pSBP|
|00005ae0| 44 72 69 76 65 72 44 61 | 74 61 2d 3e 64 72 69 76 |DriverDa|ta->driv|
|00005af0| 65 72 4f 70 65 6e 65 64 | 20 3d 20 74 72 75 65 3b |erOpened| = true;|
|00005b00| 0d 09 7d 0d 0d 09 2f 2f | 20 43 6c 65 61 6e 20 75 |..}...//| Clean u|
|00005b10| 70 20 6f 6e 20 65 72 72 | 6f 72 2e 0d 09 69 66 20 |p on err|or...if |
|00005b20| 28 73 74 61 74 75 73 20 | 21 3d 20 6e 6f 45 72 72 |(status |!= noErr|
|00005b30| 29 0d 09 7b 0d 09 09 69 | 66 20 28 73 62 70 44 72 |)..{...i|f (sbpDr|
|00005b40| 69 76 65 72 49 44 20 21 | 3d 20 6b 49 6e 76 61 6c |iverID !|= kInval|
|00005b50| 69 64 53 42 50 44 72 69 | 76 65 72 49 44 29 0d 09 |idSBPDri|verID)..|
|00005b60| 09 09 44 69 73 70 6f 73 | 65 53 42 50 44 72 69 76 |..Dispos|eSBPDriv|
|00005b70| 65 72 20 28 73 62 70 44 | 72 69 76 65 72 49 44 29 |er (sbpD|riverID)|
|00005b80| 3b 0d 09 7d 0d 0d 09 2f | 2f 20 52 65 74 75 72 6e |;..}.../|/ Return|
|00005b90| 20 72 65 73 75 6c 74 73 | 2e 0d 09 69 66 20 28 73 | results|...if (s|
|00005ba0| 74 61 74 75 73 20 3d 3d | 20 6e 6f 45 72 72 29 0d |tatus ==| noErr).|
|00005bb0| 09 09 2a 70 53 42 50 44 | 72 69 76 65 72 49 44 20 |..*pSBPD|riverID |
|00005bc0| 3d 20 73 62 70 44 72 69 | 76 65 72 49 44 3b 0d 09 |= sbpDri|verID;..|
|00005bd0| 65 6c 73 65 0d 09 09 2a | 70 53 42 50 44 72 69 76 |else...*|pSBPDriv|
|00005be0| 65 72 49 44 20 3d 20 6b | 49 6e 76 61 6c 69 64 53 |erID = k|InvalidS|
|00005bf0| 42 50 44 72 69 76 65 72 | 49 44 3b 0d 0d 09 72 65 |BPDriver|ID;...re|
|00005c00| 74 75 72 6e 20 28 73 74 | 61 74 75 73 29 3b 0d 7d |turn (st|atus);.}|
|00005c10| 0d 0d 0d 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.../////|////////|
|00005c20| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005c30| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005c40| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005c50| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00005c60| 2f 2f 2f 0d 2f 2f 0d 2f | 2f 20 43 72 65 61 74 65 |///.//./|/ Create|
|00005c70| 53 42 50 44 72 69 76 65 | 72 49 44 0d 2f 2f 0d 2f |SBPDrive|rID.//./|
|00005c80| 2f 20 20 20 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |/ This| routine|
|00005c90| 20 63 72 65 61 74 65 73 | 20 61 20 6e 65 77 20 53 | creates| a new S|
|00005ca0| 61 6d 70 6c 65 20 53 42 | 50 20 64 72 69 76 65 72 |ample SB|P driver|
|00005cb0| 20 72 65 63 6f 72 64 2c | 20 61 64 64 73 20 69 74 | record,| adds it|
|00005cc0| 20 74 6f 0d 2f 2f 20 74 | 68 65 20 66 61 6d 69 6c | to.// t|he famil|
|00005cd0| 79 20 6c 69 73 74 2c 20 | 61 6e 64 20 72 65 74 75 |y list, |and retu|
|00005ce0| 72 6e 73 20 74 68 65 20 | 49 44 20 66 6f 72 20 74 |rns the |ID for t|
|00005cf0| 68 65 20 6e 65 77 20 64 | 72 69 76 65 72 20 72 65 |he new d|river re|
|00005d00| 63 6f 72 64 2e 0d 2f 2f | 0d 0d 73 74 61 74 69 63 |cord..//|..static|
|00005d10| 20 4f 53 53 74 61 74 75 | 73 09 43 72 65 61 74 65 | OSStatu|s.Create|
|00005d20| 53 42 50 44 72 69 76 65 | 72 49 44 28 0d 09 53 42 |SBPDrive|rID(..SB|
|00005d30| 50 44 72 69 76 65 72 49 | 44 09 09 09 09 09 2a 70 |PDriverI|D.....*p|
|00005d40| 53 42 50 44 72 69 76 65 | 72 49 44 29 0d 7b 0d 09 |SBPDrive|rID).{..|
|00005d50| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 50 74 72 |SBPDrive|rDataPtr|
|00005d60| 09 09 09 70 53 42 50 44 | 72 69 76 65 72 44 61 74 |...pSBPD|riverDat|
|00005d70| 61 20 3d 20 6e 69 6c 2c | 0d 09 09 09 09 09 09 09 |a = nil,|........|
|00005d80| 09 70 4e 65 78 74 53 42 | 50 44 72 69 76 65 72 44 |.pNextSB|PDriverD|
|00005d90| 61 74 61 3b 0d 09 4f 53 | 53 74 61 74 75 73 09 09 |ata;..OS|Status..|
|00005da0| 09 09 09 73 74 61 74 75 | 73 20 3d 20 6e 6f 45 72 |...statu|s = noEr|
|00005db0| 72 3b 0d 0d 09 2f 2f 20 | 41 6c 6c 6f 63 61 74 65 |r;...// |Allocate|
|00005dc0| 20 53 61 6d 70 6c 65 20 | 53 42 50 20 64 72 69 76 | Sample |SBP driv|
|00005dd0| 65 72 20 72 65 63 6f 72 | 64 2e 0d 09 70 53 42 50 |er recor|d...pSBP|
|00005de0| 44 72 69 76 65 72 44 61 | 74 61 20 3d 20 28 53 42 |DriverDa|ta = (SB|
|00005df0| 50 44 72 69 76 65 72 44 | 61 74 61 50 74 72 29 0d |PDriverD|ataPtr).|
|00005e00| 09 09 50 6f 6f 6c 41 6c | 6c 6f 63 61 74 65 52 65 |..PoolAl|locateRe|
|00005e10| 73 69 64 65 6e 74 20 28 | 73 69 7a 65 6f 66 20 28 |sident (|sizeof (|
|00005e20| 53 42 50 44 72 69 76 65 | 72 44 61 74 61 29 2c 20 |SBPDrive|rData), |
|00005e30| 74 72 75 65 29 3b 0d 09 | 69 66 20 28 70 53 42 50 |true);..|if (pSBP|
|00005e40| 44 72 69 76 65 72 44 61 | 74 61 20 21 3d 20 6e 69 |DriverDa|ta != ni|
|00005e50| 6c 29 0d 09 09 70 53 42 | 50 44 72 69 76 65 72 44 |l)...pSB|PDriverD|
|00005e60| 61 74 61 2d 3e 73 62 70 | 44 72 69 76 65 72 49 44 |ata->sbp|DriverID|
|00005e70| 20 3d 20 28 53 42 50 44 | 72 69 76 65 72 49 44 29 | = (SBPD|riverID)|
|00005e80| 20 70 53 42 50 44 72 69 | 76 65 72 44 61 74 61 3b | pSBPDri|verData;|
|00005e90| 0d 09 65 6c 73 65 0d 09 | 09 73 74 61 74 75 73 20 |..else..|.status |
|00005ea0| 3d 20 6d 65 6d 46 75 6c | 6c 45 72 72 3b 0d 0d 09 |= memFul|lErr;...|
|00005eb0| 2f 2f 20 41 64 64 20 64 | 72 69 76 65 72 20 72 65 |// Add d|river re|
|00005ec0| 63 6f 72 64 20 74 6f 20 | 66 61 6d 69 6c 79 20 6c |cord to |family l|
|00005ed0| 69 73 74 2e 0d 09 69 66 | 20 28 73 74 61 74 75 73 |ist...if| (status|
|00005ee0| 20 3d 3d 20 6e 6f 45 72 | 72 29 0d 09 7b 0d 09 09 | == noEr|r)..{...|
|00005ef0| 70 4e 65 78 74 53 42 50 | 44 72 69 76 65 72 44 61 |pNextSBP|DriverDa|
|00005f00| 74 61 20 3d 20 67 70 53 | 42 50 46 61 6d 69 6c 79 |ta = gpS|BPFamily|
|00005f10| 44 61 74 61 2d 3e 70 53 | 42 50 44 72 69 76 65 72 |Data->pS|BPDriver|
|00005f20| 4c 69 73 74 3b 0d 09 09 | 70 53 42 50 44 72 69 76 |List;...|pSBPDriv|
|00005f30| 65 72 44 61 74 61 2d 3e | 70 4e 65 78 74 53 42 50 |erData->|pNextSBP|
|00005f40| 44 72 69 76 65 72 44 61 | 74 61 20 3d 20 70 4e 65 |DriverDa|ta = pNe|
|00005f50| 78 74 53 42 50 44 72 69 | 76 65 72 44 61 74 61 3b |xtSBPDri|verData;|
|00005f60| 0d 09 09 67 70 53 42 50 | 46 61 6d 69 6c 79 44 61 |...gpSBP|FamilyDa|
|00005f70| 74 61 2d 3e 70 53 42 50 | 44 72 69 76 65 72 4c 69 |ta->pSBP|DriverLi|
|00005f80| 73 74 20 3d 20 70 53 42 | 50 44 72 69 76 65 72 44 |st = pSB|PDriverD|
|00005f90| 61 74 61 3b 0d 09 09 67 | 70 53 42 50 46 61 6d 69 |ata;...g|pSBPFami|
|00005fa0| 6c 79 44 61 74 61 2d 3e | 6e 75 6d 53 42 50 44 72 |lyData->|numSBPDr|
|00005fb0| 69 76 65 72 73 2b 2b 3b | 0d 09 7d 0d 0d 09 2f 2f |ivers++;|..}...//|
|00005fc0| 20 52 65 74 75 72 6e 20 | 72 65 73 75 6c 74 20 61 | Return |result a|
|00005fd0| 6e 64 20 63 6c 65 61 6e | 20 75 70 20 6f 6e 20 65 |nd clean| up on e|
|00005fe0| 72 72 6f 72 2e 0d 09 69 | 66 20 28 73 74 61 74 75 |rror...i|f (statu|
|00005ff0| 73 20 3d 3d 20 6e 6f 45 | 72 72 29 0d 09 7b 0d 09 |s == noE|rr)..{..|
|00006000| 09 2a 70 53 42 50 44 72 | 69 76 65 72 49 44 20 3d |.*pSBPDr|iverID =|
|00006010| 20 70 53 42 50 44 72 69 | 76 65 72 44 61 74 61 2d | pSBPDri|verData-|
|00006020| 3e 73 62 70 44 72 69 76 | 65 72 49 44 3b 0d 09 7d |>sbpDriv|erID;..}|
|00006030| 0d 09 65 6c 73 65 0d 09 | 7b 0d 09 09 69 66 20 28 |..else..|{...if (|
|00006040| 70 53 42 50 44 72 69 76 | 65 72 44 61 74 61 20 21 |pSBPDriv|erData !|
|00006050| 3d 20 6e 69 6c 29 0d 09 | 09 09 50 6f 6f 6c 44 65 |= nil)..|..PoolDe|
|00006060| 61 6c 6c 6f 63 61 74 65 | 20 28 28 50 74 72 29 20 |allocate| ((Ptr) |
|00006070| 70 53 42 50 44 72 69 76 | 65 72 44 61 74 61 29 3b |pSBPDriv|erData);|
|00006080| 0d 0d 09 09 2a 70 53 42 | 50 44 72 69 76 65 72 49 |....*pSB|PDriverI|
|00006090| 44 20 3d 20 6b 49 6e 76 | 61 6c 69 64 53 42 50 44 |D = kInv|alidSBPD|
|000060a0| 72 69 76 65 72 49 44 3b | 0d 09 7d 0d 0d 09 72 65 |riverID;|..}...re|
|000060b0| 74 75 72 6e 20 28 73 74 | 61 74 75 73 29 3b 0d 7d |turn (st|atus);.}|
|000060c0| 0d 0d 0d 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |.../////|////////|
|000060d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000060e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000060f0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00006100| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00006110| 2f 2f 2f 0d 2f 2f 0d 2f | 2f 20 44 69 73 70 6f 73 |///.//./|/ Dispos|
|00006120| 65 53 42 50 44 72 69 76 | 65 72 0d 2f 2f 0d 2f 2f |eSBPDriv|er.//.//|
|00006130| 20 20 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | This |routine |
|00006140| 64 69 73 70 6f 73 65 73 | 20 6f 66 20 74 68 65 20 |disposes| of the |
|00006150| 67 69 76 65 6e 20 64 72 | 69 76 65 72 2e 20 20 49 |given dr|iver. I|
|00006160| 74 20 77 69 6c 6c 20 63 | 61 6c 6c 20 74 68 65 20 |t will c|all the |
|00006170| 64 72 69 76 65 72 20 74 | 6f 0d 2f 2f 20 74 65 72 |driver t|o.// ter|
|00006180| 6d 69 6e 61 74 65 20 69 | 74 73 65 6c 66 2c 20 64 |minate i|tself, d|
|00006190| 69 73 70 6f 73 65 20 6f | 66 20 74 68 65 20 64 72 |ispose o|f the dr|
|000061a0| 69 76 65 72 20 6d 65 6d | 6f 72 79 20 63 6c 6f 73 |iver mem|ory clos|
|000061b0| 75 72 65 2c 20 72 65 6d | 6f 76 65 20 74 68 65 20 |ure, rem|ove the |
|000061c0| 64 72 69 76 65 72 0d 2f | 2f 20 64 61 74 61 20 72 |driver./|/ data r|
|000061d0| 65 63 6f 72 64 20 66 72 | 6f 6d 20 6f 75 72 20 6c |ecord fr|om our l|
|000061e0| 69 73 74 2c 20 61 6e 64 | 20 64 69 73 70 6f 73 65 |ist, and| dispose|
|000061f0| 20 6f 66 20 74 68 65 20 | 64 72 69 76 65 72 20 64 | of the |driver d|
|00006200| 61 74 61 20 72 65 63 6f | 72 64 2e 0d 2f 2f 0d 0d |ata reco|rd..//..|
|00006210| 73 74 61 74 69 63 20 76 | 6f 69 64 09 44 69 73 70 |static v|oid.Disp|
|00006220| 6f 73 65 53 42 50 44 72 | 69 76 65 72 28 0d 09 53 |oseSBPDr|iver(..S|
|00006230| 42 50 44 72 69 76 65 72 | 49 44 09 09 09 09 09 73 |BPDriver|ID.....s|
|00006240| 62 70 44 72 69 76 65 72 | 49 44 29 0d 7b 0d 09 53 |bpDriver|ID).{..S|
|00006250| 42 50 44 72 69 76 65 72 | 44 61 74 61 50 74 72 09 |BPDriver|DataPtr.|
|00006260| 09 09 70 53 42 50 44 72 | 69 76 65 72 44 61 74 61 |..pSBPDr|iverData|
|00006270| 2c 0d 09 09 09 09 09 09 | 09 09 70 53 65 61 72 63 |,.......|..pSearc|
|00006280| 68 53 42 50 44 72 69 76 | 65 72 44 61 74 61 2c 0d |hSBPDriv|erData,.|
|00006290| 09 09 09 09 09 09 09 09 | 70 50 72 65 76 53 42 50 |........|pPrevSBP|
|000062a0| 44 72 69 76 65 72 44 61 | 74 61 3b 0d 09 54 48 7a |DriverDa|ta;..THz|
|000062b0| 09 09 09 09 09 09 09 63 | 75 72 72 65 6e 74 5a 6f |.......c|urrentZo|
|000062c0| 6e 65 3b 0d 0d 09 2f 2f | 20 53 77 69 74 63 68 20 |ne;...//| Switch |
|000062d0| 74 6f 20 73 79 73 74 65 | 6d 20 7a 6f 6e 65 2e 0d |to syste|m zone..|
|000062e0| 09 63 75 72 72 65 6e 74 | 5a 6f 6e 65 20 3d 20 47 |.current|Zone = G|
|000062f0| 65 74 5a 6f 6e 65 20 28 | 29 3b 0d 09 53 65 74 5a |etZone (|);..SetZ|
|00006300| 6f 6e 65 20 28 53 79 73 | 74 65 6d 5a 6f 6e 65 20 |one (Sys|temZone |
|00006310| 28 29 29 3b 0d 0d 09 2f | 2f 20 47 65 74 20 74 68 |());.../|/ Get th|
|00006320| 65 20 64 72 69 76 65 72 | 20 64 61 74 61 20 66 72 |e driver| data fr|
|00006330| 6f 6d 20 74 68 65 20 49 | 44 2e 0d 09 70 53 42 50 |om the I|D...pSBP|
|00006340| 44 72 69 76 65 72 44 61 | 74 61 20 3d 20 28 53 42 |DriverDa|ta = (SB|
|00006350| 50 44 72 69 76 65 72 44 | 61 74 61 50 74 72 29 20 |PDriverD|ataPtr) |
|00006360| 73 62 70 44 72 69 76 65 | 72 49 44 3b 0d 0d 09 2f |sbpDrive|rID;.../|
|00006370| 2f 20 43 6c 6f 73 65 20 | 74 68 65 20 64 72 69 76 |/ Close |the driv|
|00006380| 65 72 2e 0d 09 69 66 20 | 28 70 53 42 50 44 72 69 |er...if |(pSBPDri|
|00006390| 76 65 72 44 61 74 61 2d | 3e 64 72 69 76 65 72 4f |verData-|>driverO|
|000063a0| 70 65 6e 65 64 29 0d 09 | 09 43 6c 6f 73 65 44 72 |pened)..|.CloseDr|
|000063b0| 69 76 65 72 20 28 70 53 | 42 50 44 72 69 76 65 72 |iver (pS|BPDriver|
|000063c0| 44 61 74 61 2d 3e 64 72 | 69 76 65 72 52 65 66 4e |Data->dr|iverRefN|
|000063d0| 75 6d 29 3b 0d 0d 09 2f | 2f 20 52 65 6d 6f 76 65 |um);.../|/ Remove|
|000063e0| 20 64 72 69 76 65 72 20 | 72 65 63 6f 72 64 20 66 | driver |record f|
|000063f0| 72 6f 6d 20 66 61 6d 69 | 6c 79 20 6c 69 73 74 2e |rom fami|ly list.|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.